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:
authorThays Grazia <thaystg@gmail.com>2021-08-28 07:36:31 +0300
committerGitHub <noreply@github.com>2021-08-28 07:36:31 +0300
commitc22719f63841dd0a0e3b43357a5001621be4b6f1 (patch)
tree50d6b6f84ccc7b491bf9a063b7f0a79d98df4d47
parentc4f02830a50213586e7d834471b90ce38350738d (diff)
Fix https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1384996?src=WorkItemMention&src-action=artifact_link (#347)
-rw-r--r--Mono.Debugging.Soft/SoftDebuggerAdaptor.cs2
-rw-r--r--Mono.Debugging.Soft/SoftDebuggerBacktrace.cs6
2 files changed, 5 insertions, 3 deletions
diff --git a/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs b/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs
index af7818b..ae51d60 100644
--- a/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs
+++ b/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs
@@ -1743,7 +1743,7 @@ namespace Mono.Debugging.Soft
var atm = attrType as TypeMirror;
var tm = type as TypeMirror;
- while (tm != null) {
+ while (tm != null && atm != null) {
if (tm.GetCustomAttributes (atm, false).Any ())
return tm;
diff --git a/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs b/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs
index 4cdda11..2c1d1ee 100644
--- a/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs
+++ b/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs
@@ -175,7 +175,8 @@ namespace Mono.Debugging.Soft
if (session.VirtualMachine.Version.AtLeast (2, 21)) {
var ctx = GetEvaluationContext (frameIndex, session.EvaluationOptions);
var hiddenAttr = session.Adaptor.GetType (ctx, "System.Diagnostics.DebuggerHiddenAttribute") as MDB.TypeMirror;
- hidden = method.GetCustomAttributes (hiddenAttr, true).Any ();
+ if (hiddenAttr != null)
+ hidden = method.GetCustomAttributes (hiddenAttr, true).Any ();
}
if (hidden) {
external = true;
@@ -184,7 +185,8 @@ namespace Mono.Debugging.Soft
if (!external && session.Options.ProjectAssembliesOnly && session.VirtualMachine.Version.AtLeast (2, 21)) {
var ctx = GetEvaluationContext (frameIndex, session.EvaluationOptions);
var nonUserCodeAttr = session.Adaptor.GetType (ctx, "System.Diagnostics.DebuggerNonUserCodeAttribute") as MDB.TypeMirror;
- external = method.GetCustomAttributes (nonUserCodeAttr, true).Any ();
+ if (nonUserCodeAttr != null)
+ external = method.GetCustomAttributes (nonUserCodeAttr, true).Any ();
}
}