Author: martin
Date: 2007-04-04 07:07:26 -0400 (Wed, 04 Apr 2007)
New Revision: 75381

Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/frontend/Command.cs
Log:
2007-04-04  Martin Baulig  <[EMAIL PROTECTED]>

        * frontend/Command.cs
        (BacktraceCommand.DoExecute): If we already have a backtrace and
        no arguments were given, reuse it.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2007-04-04 11:00:46 UTC (rev 75380)
+++ trunk/debugger/ChangeLog    2007-04-04 11:07:26 UTC (rev 75381)
@@ -1,3 +1,9 @@
+2007-04-04  Martin Baulig  <[EMAIL PROTECTED]>
+
+       * frontend/Command.cs
+       (BacktraceCommand.DoExecute): If we already have a backtrace and
+       no arguments were given, reuse it.
+
 2007-03-28  Jb Evain  <[EMAIL PROTECTED]>
 
        * frontend/Command.cs: Rename PrintFrameCommand to SelectFrameCommand.

Modified: trunk/debugger/frontend/Command.cs
===================================================================
--- trunk/debugger/frontend/Command.cs  2007-04-04 11:00:46 UTC (rev 75380)
+++ trunk/debugger/frontend/Command.cs  2007-04-04 11:07:26 UTC (rev 75381)
@@ -1394,8 +1394,14 @@
 
                protected override object DoExecute (ScriptingContext context)
                {
-                       Backtrace backtrace = CurrentThread.GetBacktrace (mode, 
max_frames);
+                       Backtrace backtrace = null;
 
+                       if ((mode == Backtrace.Mode.Default) && (max_frames == 
-1))
+                               backtrace = CurrentThread.CurrentBacktrace;
+
+                       if (backtrace == null)
+                               backtrace = CurrentThread.GetBacktrace (mode, 
max_frames);
+
                        for (int i = 0; i < backtrace.Count; i++) {
                                string prefix = i == 
backtrace.CurrentFrameIndex ? "(*)" : "   ";
                                context.Print ("{0} {1}", prefix, backtrace 
[i]);

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

Reply via email to