summaryrefslogtreecommitdiff
path: root/modules/mono/glue/cs_files/DebuggingUtils.cs
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2018-01-12 19:23:11 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2018-01-12 19:31:15 +0100
commitbff9627dc47f12d517c96a2ba5ee929810491761 (patch)
tree1474a37122c73213c98db91646cf3e57edbe5838 /modules/mono/glue/cs_files/DebuggingUtils.cs
parentfeb843da2b5e63a2293f6220f52b019a5fc55df5 (diff)
Mono: Some StackTrace to StackInfo[] fixes
- Sometimes `StackFrame.GetMethod()` returns null (e.g.: latest frame of a `MissingMethodException`). Still not sure what to do with that frame (maybe skip it), but at least it no longer fails. - Skip `CSharpLanguage::debug_get_current_stack_info()` if an error is printed from `GDMonoUtils::update_corlib_cache()`. - Fix crash when calling `GDMonoUtils::print_unhandled_exception(exc)` if there is no ScriptDebugger attached.
Diffstat (limited to 'modules/mono/glue/cs_files/DebuggingUtils.cs')
-rw-r--r--modules/mono/glue/cs_files/DebuggingUtils.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/mono/glue/cs_files/DebuggingUtils.cs b/modules/mono/glue/cs_files/DebuggingUtils.cs
index ced78f658d..42ca57fbf9 100644
--- a/modules/mono/glue/cs_files/DebuggingUtils.cs
+++ b/modules/mono/glue/cs_files/DebuggingUtils.cs
@@ -26,6 +26,12 @@ namespace Godot
MethodBase methodBase = frame.GetMethod();
+ if (methodBase == null)
+ {
+ methodDecl = string.Empty;
+ return;
+ }
+
StringBuilder sb = new StringBuilder();
if (methodBase is MethodInfo methodInfo)