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

github.com/mono/debugger-libs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan CHang <jonathan34c@gmail.com>2022-07-19 17:44:02 +0300
committerJonathan CHang <jonathan34c@gmail.com>2022-07-19 17:44:02 +0300
commit02f592209c5a1b1b07dfcb0f630d0b5e4e40fdc7 (patch)
tree460c15b35ce9fb771e4e199a664d5518582a1cce
parentb1dd19e685ba9f658d84be03a06ac365ff92730c (diff)
support dynamic assembly
-rw-r--r--Mono.Debugging.Soft/SoftDebuggerSession.cs22
-rw-r--r--Mono.Debugging/Mono.Debugging.Client/Assembly.cs9
2 files changed, 18 insertions, 13 deletions
diff --git a/Mono.Debugging.Soft/SoftDebuggerSession.cs b/Mono.Debugging.Soft/SoftDebuggerSession.cs
index 5661168..5dc4f89 100644
--- a/Mono.Debugging.Soft/SoftDebuggerSession.cs
+++ b/Mono.Debugging.Soft/SoftDebuggerSession.cs
@@ -2262,19 +2262,17 @@ namespace Mono.Debugging.Soft
private void HandleAssemblyLoaded (AssemblyMirror asm)
{
- var symbolStatus = string.Empty;
- var assemblyName = string.Empty;
- var hasSymbol = false;
var name = asm.GetName ();
var assemblyObject = asm.GetAssemblyObject ();
- if (!asm.IsDynamic) {
+ bool isDynamic = asm.IsDynamic;
+ string assemblyName;
+ bool hasSymbol;
+ if (!isDynamic) {
var metaData = asm.GetMetadata ();
- symbolStatus = metaData.MainModule.HasSymbols == true ? "Symbol loaded" : "Skipped loading symbols";
assemblyName = metaData.MainModule.Name;
hasSymbol = metaData.MainModule.HasSymbols;
} else {
- symbolStatus = "Skipped loading symbol (dynamic)";
- assemblyName = "Dynamic assembly";
+ assemblyName = string.Empty;
hasSymbol = false;
}
var assembly = new Assembly (
@@ -2282,16 +2280,18 @@ namespace Mono.Debugging.Soft
asm.Location,
true,
hasSymbol,
- symbolStatus,
- "",
+ string.Empty,
+ string.Empty,
-1,
name.Version.Major.ToString (),
// TODO: module time stamp
- "",
+ string.Empty,
assemblyObject.Address.ToString (),
string.Format ("[{0}]{1}", asm.VirtualMachine.TargetProcess.Id, asm.VirtualMachine.TargetProcess.ProcessName),
asm.Domain.FriendlyName,
- asm.VirtualMachine.TargetProcess.Id
+ asm.VirtualMachine.TargetProcess.Id,
+ hasSymbol,
+ isDynamic
);
OnAssemblyLoaded (assembly);
diff --git a/Mono.Debugging/Mono.Debugging.Client/Assembly.cs b/Mono.Debugging/Mono.Debugging.Client/Assembly.cs
index 4a9ad60..966e9e6 100644
--- a/Mono.Debugging/Mono.Debugging.Client/Assembly.cs
+++ b/Mono.Debugging/Mono.Debugging.Client/Assembly.cs
@@ -28,7 +28,7 @@ namespace Mono.Debugging.Client
{
public class Assembly
{
- public Assembly (string name, string path, bool optimized, bool userCode, string symbolStatus, string symbolFile, int? order, string version, string timestamp, string address, string process, string appdomain, long? processId)
+ public Assembly (string name, string path, bool optimized, bool userCode, string symbolStatus, string symbolFile, int? order, string version, string timestamp, string address, string process, string appdomain, long? processId, bool hasSymbol = false, bool isDynamic = false)
{
Name = name;
Path = path;
@@ -43,7 +43,8 @@ namespace Mono.Debugging.Client
Version = version;
UserCode = userCode;
ProcessId = processId;
-
+ IsDynamic = isDynamic;
+ HasSymbol = hasSymbol;
}
public Assembly (string path)
{
@@ -75,5 +76,9 @@ namespace Mono.Debugging.Client
public string AppDomain { get; private set; }
public long? ProcessId { get; private set; } = -1;
+
+ public bool HasSymbol { get; private set; }
+
+ public bool IsDynamic { get; private set; }
}
} \ No newline at end of file