diff options
| author | Ignacio Etcheverry | 2018-01-12 19:23:11 +0100 |
|---|---|---|
| committer | Ignacio Etcheverry | 2018-01-12 19:31:15 +0100 |
| commit | bff9627dc47f12d517c96a2ba5ee929810491761 (patch) | |
| tree | 1474a37122c73213c98db91646cf3e57edbe5838 /modules/mono/glue/cs_files/DebuggingUtils.cs | |
| parent | feb843da2b5e63a2293f6220f52b019a5fc55df5 (diff) | |
| download | godot-bff9627dc47f12d517c96a2ba5ee929810491761.tar.gz godot-bff9627dc47f12d517c96a2ba5ee929810491761.tar.zst godot-bff9627dc47f12d517c96a2ba5ee929810491761.zip | |
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.cs | 6 |
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 ced78f658..42ca57fbf 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) |
