Author: zoltan
Date: 2007-04-27 08:33:48 -0400 (Fri, 27 Apr 2007)
New Revision: 76382
Modified:
trunk/mcs/class/corlib/System.Diagnostics/ChangeLog
trunk/mcs/class/corlib/System.Diagnostics/StackTrace.cs
Log:
2007-04-27 Zoltan Varga <[EMAIL PROTECTED]>
* StackTrace.cs: Fix ToString () to be compatible with MS. Fixes #81207.
Modified: trunk/mcs/class/corlib/System.Diagnostics/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Diagnostics/ChangeLog 2007-04-27 12:25:57 UTC
(rev 76381)
+++ trunk/mcs/class/corlib/System.Diagnostics/ChangeLog 2007-04-27 12:33:48 UTC
(rev 76382)
@@ -1,3 +1,7 @@
+2007-04-27 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * StackTrace.cs: Fix ToString () to be compatible with MS. Fixes #81207.
+
2006-07-24 Miguel de Icaza <[EMAIL PROTECTED]>
* DebuggerDisplayAttribute.cs: Update the targets
Modified: trunk/mcs/class/corlib/System.Diagnostics/StackTrace.cs
===================================================================
--- trunk/mcs/class/corlib/System.Diagnostics/StackTrace.cs 2007-04-27
12:25:57 UTC (rev 76381)
+++ trunk/mcs/class/corlib/System.Diagnostics/StackTrace.cs 2007-04-27
12:33:48 UTC (rev 76382)
@@ -193,11 +193,34 @@
StringBuilder sb = new StringBuilder ();
for (int i = 0; i < FrameCount; i++) {
StackFrame frame = GetFrame (i);
- sb.Append (newline);
+ if (i > 0)
+ sb.Append (newline);
+ else
+ sb.AppendFormat (" {0} ",
Locale.GetText ("at"));
MethodBase method = frame.GetMethod ();
if (method != null) {
// Method information available
- sb.AppendFormat ("{0}.{1} ()",
method.DeclaringType.FullName, method.Name);
+ sb.AppendFormat ("{0}.{1}",
method.DeclaringType.FullName, method.Name);
+ /* Append parameter information */
+ sb.Append ("(");
+ ParameterInfo[] p =
method.GetParameters ();
+ for (int j = 0; j < p.Length; ++j) {
+ if (j > 0)
+ sb.Append (", ");
+ Type pt = p[j].ParameterType;
+ bool byref = pt.IsByRef;
+ if (byref)
+ pt = pt.GetElementType
();
+ if (pt.IsClass && pt.Namespace
!= String.Empty) {
+ sb.Append
(pt.Namespace);
+ sb.Append (".");
+ }
+ sb.Append (pt.Name);
+ if (byref)
+ sb.Append (" ByRef");
+ sb.AppendFormat (" {0}", p
[j].Name);
+ }
+ sb.Append (")");
}
else {
// Method information not available
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches