Diff of /main/trunk/interpreter/execution/RexxActivation.cpp [r9543] .. [r9544]  Maximize  Restore

Switch to side-by-side view

--- a/main/trunk/interpreter/execution/RexxActivation.cpp
+++ b/main/trunk/interpreter/execution/RexxActivation.cpp
@@ -3510,7 +3510,7 @@
 }
 
 
-RexxString * RexxActivation::formatTrace(
+RexxString *RexxActivation::formatTrace(
    RexxInstruction *  instruction,     /* instruction to trace              */
    RexxSource      *  _source )        /* program source                    */
 /******************************************************************************/
@@ -3527,11 +3527,11 @@
                                            /* (formatted for tracing)           */
     if (this->settings.traceindent < MAX_TRACEBACK_INDENT)
     {
-        return _source->traceBack(location, this->settings.traceindent, true);
+        return _source->traceBack(this, location, this->settings.traceindent, true);
     }
     else
     {
-        return _source->traceBack(location, MAX_TRACEBACK_INDENT, true);
+        return _source->traceBack(this, location, MAX_TRACEBACK_INDENT, true);
     }
 }
 
@@ -4336,3 +4336,39 @@
     RexxString *traceback = getTraceBack();
     return new StackFrameClass(type, getMessageName(), (BaseExecutable *)getExecutableObject(), target, arguments, traceback, getContextLineNumber());
 }
+
+/**
+ * Format a more informative trace line when giving
+ * traceback information for code when no source code is
+ * available.
+ *
+ * @param packageName
+ *               The package name to use (could be "REXX" for internal code)
+ *
+ * @return A formatted descriptive string for the invocation.
+ */
+RexxString *RexxActivation::formatSourcelessTraceLine(RexxString *packageName)
+{
+    // if this is a method invocation, then we can give the method name and scope.
+    if (isMethod())
+    {
+        RexxArray *info = new_array(getMessageName(), scope->getId(), packageName);
+        ProtectedObject p(info);
+
+        return activity->buildMessage(Message_Translations_sourceless_method_invocation, info);
+    }
+    else if (isRoutine())
+    {
+        RexxArray *info = new_array(getMessageName(), packageName);
+        ProtectedObject p(info);
+
+        return activity->buildMessage(Message_Translations_sourceless_routine_invocation, info);
+    }
+    else
+    {
+        RexxArray *info = new_array(packageName);
+        ProtectedObject p(info);
+
+        return activity->buildMessage(Message_Translations_sourceless_program_invocation, info);
+    }
+}

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks