Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kliger (λgeek) <alklig@microsoft.com>2021-03-05 21:28:46 +0300
committerGitHub <noreply@github.com>2021-03-05 21:28:46 +0300
commit1fcfcbc43e7e31a7a223b51620244acc6eaef836 (patch)
tree826167073f33fb669059eb898b36536e992a658a
parent785bf39911a998df1d20a54303023d483f972c9b (diff)
[sdb] Add Module.ApplyChanges (#20889)
* [sdb] Add Module.ApplyChanges * [mini] Add CMD_MODULE_APPLY_CHANGES Unused, but reserved to keep the protocol enums in sync with dotnet/runtime * Exclude Mono.Debugger.Soft.dll from apidiff check * Bump api-snapshot submodule Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
m---------external/api-snapshot0
-rw-r--r--mcs/Makefile2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs6
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs8
-rw-r--r--mono/mini/debugger-agent.c1
5 files changed, 16 insertions, 1 deletions
diff --git a/external/api-snapshot b/external/api-snapshot
-Subproject 2d911b06ce64642cf952bb2f2dfcbf292e33569
+Subproject faf86629681c02638e5dffe42bcedb8a0b11d6c
diff --git a/mcs/Makefile b/mcs/Makefile
index 216471eabeb..829e6b59fd4 100644
--- a/mcs/Makefile
+++ b/mcs/Makefile
@@ -155,7 +155,7 @@ distcheck: dist-tarball
MONO_API_SNAPSHOT_PATH := $(topdir)../external/api-snapshot/
GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/Microsoft.DotNet.GenAPI.exe
MONO_API_SNAPSHOT_PROFILE_PATH := $(MONO_API_SNAPSHOT_PATH)profiles/$(PROFILE)/
-MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunitlite.dll Mono.Profiler.Log.dll)
+MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunitlite.dll Mono.Profiler.Log.dll Mono.Debugger.Soft.dll)
MONO_API_ASSEMBLIES := $(filter-out $(MONO_API_ASSEMBLIES_IGNORED), $(wildcard $(topdir)class/lib/$(PROFILE)/*.dll)) $(wildcard $(topdir)class/lib/$(PROFILE)/Facades/*.dll)
MONO_API_ASSEMBLIES_CS := $(MONO_API_ASSEMBLIES:$(topdir)class/lib/$(PROFILE)/%.dll=$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs)
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index 75c424215f9..1b1e81f5a87 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -568,6 +568,7 @@ namespace Mono.Debugger.Soft
enum CmdModule {
GET_INFO = 1,
+ APPLY_CHANGES = 2,
}
enum CmdMethod {
@@ -2359,6 +2360,11 @@ namespace Mono.Debugger.Soft
return info;
}
+
+ internal void Module_ApplyChanges (long id, long dmeta_id, long dil_id, long dpdb_id) {
+ SendReceive (CommandSet.MODULE, (int)CmdModule.APPLY_CHANGES, new PacketWriter().WriteId (id).WriteId (dmeta_id).WriteId (dil_id).WriteId (dpdb_id));
+ }
+
/*
* ASSEMBLY
*/
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs
index 03dfcc19aa0..d585c15998c 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs
@@ -70,5 +70,13 @@ namespace Mono.Debugger.Soft
return info.SourceLink;
}
}
+
+ // Apply a hot reload delta to the current module
+ // Since protocol version 2.60
+ public void ApplyChanges (ArrayMirror dmeta, ArrayMirror dIL, Value dPDB) {
+ /* dPDB is Value because it can be ArrayMirror or PrimitiveValue (vm, null) */
+ vm.CheckProtocolVersion (2, 60);
+ vm.conn.Module_ApplyChanges (id, dmeta.Id, dIL.Id, dPDB.Id);
+ }
}
}
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c
index 09cac6ac5e7..922ee0d9370 100644
--- a/mono/mini/debugger-agent.c
+++ b/mono/mini/debugger-agent.c
@@ -412,6 +412,7 @@ typedef enum {
typedef enum {
CMD_MODULE_GET_INFO = 1,
+ CMD_MODULE_APPLY_CHANGES = 2, /* unused, reserved */
} CmdModule;
typedef enum {