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-07 23:43:43 +0300
committerJonathan CHang <jonathan34c@gmail.com>2022-07-07 23:43:43 +0300
commitf8efa7bc8583e2134655b37b6ac4e7a5ff1edbed (patch)
tree6670828fa33ade66131e0884372d1f03459373d8
parent8c74e69a8fa5dd7c96756c9bc7878564510ca7fe (diff)
try catch + nukk checkdev/t-jochang/unitSoft
-rw-r--r--Mono.Debugging.Soft/SoftDebuggerSession.cs34
1 files changed, 18 insertions, 16 deletions
diff --git a/Mono.Debugging.Soft/SoftDebuggerSession.cs b/Mono.Debugging.Soft/SoftDebuggerSession.cs
index e55a599..88bdbf8 100644
--- a/Mono.Debugging.Soft/SoftDebuggerSession.cs
+++ b/Mono.Debugging.Soft/SoftDebuggerSession.cs
@@ -2249,27 +2249,29 @@ namespace Mono.Debugging.Soft
if (events.Length > 1 && events.Any (a => a.Assembly != asm))
throw new InvalidOperationException ("Simultaneous AssemblyLoadEvent for multiple assemblies");
- var symbolStatus = asm.GetMetadata ().MainModule.HasSymbols ? "Symbol loaded" : "Skipped loading symbols";
-
try {
+ var metaData = asm?.GetMetadata ();
+ var symbolStatus = metaData?.MainModule.HasSymbols==true ? "Symbol loaded" : "Skipped loading symbols";
+ var symbolVersion = asm?.GetName ()?.Version?.Major.ToString () ?? "Version";
var assembly = new Assembly (
- asm.GetMetadata ().MainModule.Name,
- asm.Location,
- true,
- asm.GetMetadata ().MainModule.HasSymbols,
- symbolStatus,
- "",
- -1,
- asm.GetName ().Version.Major.ToString (),
- // TODO: module time stamp
- "",
- asm.GetAssemblyObject ().Address.ToString (),
- string.Format ("[{0}]{1}", asm.VirtualMachine.TargetProcess.Id, asm.VirtualMachine.TargetProcess.ProcessName),
- asm.Domain.FriendlyName,
- asm.VirtualMachine.TargetProcess.Id
+ metaData?.MainModule?.Name ?? "Name",
+ asm?.Location ?? "Location",
+ true,
+ metaData?.MainModule.HasSymbols == true,
+ symbolStatus,
+ "",
+ -1,
+ asm?.GetName ()?.Version?.Major.ToString () ?? "Version",
+ // TODO: module time stamp
+ "",
+ asm?.GetAssemblyObject ().Address.ToString ()??"Address",
+ string.Format ("[{0}]{1}", asm?.VirtualMachine?.TargetProcess?.Id, asm?.VirtualMachine?.TargetProcess?.ProcessName) ??"ID",
+ asm?.Domain.FriendlyName??"Domain Name",
+ asm?.VirtualMachine.TargetProcess.Id ?? -1
);
OnAssemblyLoaded (assembly.Address);
+
} catch (Exception e) {
//TODO log exception
}