Author: martin
Date: 2005-10-10 12:46:15 -0400 (Mon, 10 Oct 2005)
New Revision: 51523

Modified:
   trunk/debugger/classes/Backtrace.cs
Log:
Make this a bit more robust.

Modified: trunk/debugger/classes/Backtrace.cs
===================================================================
--- trunk/debugger/classes/Backtrace.cs 2005-10-10 16:45:43 UTC (rev 51522)
+++ trunk/debugger/classes/Backtrace.cs 2005-10-10 16:46:15 UTC (rev 51523)
@@ -105,12 +105,19 @@
                                                        IArchitecture arch)
                {
                        IMethod method = last_frame.Method;
-                       if (method != null)
-                               return method.UnwindStack (
-                                       last_frame.SimpleFrame, memory, arch);
+                       SimpleStackFrame new_frame = null;
+                       if (method != null) {
+                               try {
+                                       new_frame = method.UnwindStack (
+                                               last_frame.SimpleFrame, memory, 
arch);
+                               } catch (TargetException) {
+                               }
 
+                               if (new_frame != null)
+                                       return new_frame;
+                       }
+
                        foreach (Module module in 
last_frame.Process.Debugger.Modules) {
-                               SimpleStackFrame new_frame = null;
                                try {
                                        new_frame = module.UnwindStack 
(last_frame.SimpleFrame, memory);
                                } catch {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to