From: <bi...@us...> - 2013-12-23 21:19:20
|
Revision: 9756 http://sourceforge.net/p/oorexx/code-0/9756 Author: bigrixx Date: 2013-12-23 21:19:16 +0000 (Mon, 23 Dec 2013) Log Message: ----------- [#1230] Missing stackframe entries with native code calls Modified Paths: -------------- main/trunk/interpreter/concurrency/RexxActivity.cpp Property Changed: ---------------- main/trunk/ Index: main/trunk =================================================================== --- main/trunk 2013-12-23 21:15:49 UTC (rev 9755) +++ main/trunk 2013-12-23 21:19:16 UTC (rev 9756) Property changes on: main/trunk ___________________________________________________________________ Modified: svn:mergeinfo ## -1,4 +1,4 ## /main/branches/4.0beta/trunk:4348-4349,4443,4454-4458,4524-4525,4568,4572,4576,4589,4636,4659,4844,4899,4907,4929 /main/branches/4.1/trunk:7642 /main/branches/4.1.0/trunk:6303,6318,6426-6428 -/main/branches/4.2.0/trunk:9710,9712,9753 +/main/branches/4.2.0/trunk:9710,9712,9753,9755 \ No newline at end of property Modified: main/trunk/interpreter/concurrency/RexxActivity.cpp =================================================================== --- main/trunk/interpreter/concurrency/RexxActivity.cpp 2013-12-23 21:15:49 UTC (rev 9755) +++ main/trunk/interpreter/concurrency/RexxActivity.cpp 2013-12-23 21:19:16 UTC (rev 9756) @@ -921,32 +921,26 @@ exobj->put(traceback, OREF_TRACEBACK); ActivationFrame *frame = activationFrames; - while (frame != OREF_NULL && frame->getSource() == OREF_NULL) - { - frame = frame->next; - } RexxSource *source = OREF_NULL; + StackFrameClass *firstFrame = OREF_NULL; - // if we have a frame, then process the list - if (frame != NULL) + while (frame != NULL) { - StackFrameClass *firstFrame = frame->createStackFrame(); - // save the source object associated with that frame - source = frame->getSource(); - stackFrames->append(firstFrame); - traceback->append(firstFrame->getTraceLine()); - - // step to the next frame - frame = frame->next; - while (frame != NULL) + StackFrameClass *stackFrame = frame->createStackFrame(); + // save the topmost source object we can find for error reporting + if (source == OREF_NULL && frame->getSource() != OREF_NULL) { - StackFrameClass *stackFrame = frame->createStackFrame(); - stackFrames->append(stackFrame); - traceback->append(stackFrame->getTraceLine()); - frame = frame->next; + firstFrame = stackFrame; + source = frame->getSource(); } + stackFrames->append(stackFrame); + traceback->append(stackFrame->getTraceLine()); + frame = frame->next; + } + if (firstFrame != OREF_NULL) + { RexxObject *lineNumber = firstFrame->getLine(); if (lineNumber != TheNilObject) { @@ -964,7 +958,7 @@ } else { - // if not available, then this is explicitly a NULLSTRINg. + // if not available, then this is explicitly a NULLSTRING. exobj->put(OREF_NULLSTRING, OREF_PROGRAM); } } @@ -982,23 +976,13 @@ ProtectedObject p(stackFrames); ActivationFrame *frame = activationFrames; - while (frame != OREF_NULL && frame->getSource() == OREF_NULL) + + while (frame != NULL) { + StackFrameClass *stackFrame = frame->createStackFrame(); + stackFrames->append(stackFrame); frame = frame->next; } - - RexxSource *source = OREF_NULL; - - // if we have a frame, then process the list - if (frame != NULL) - { - while (frame != NULL) - { - StackFrameClass *stackFrame = frame->createStackFrame(); - stackFrames->append(stackFrame); - frame = frame->next; - } - } return stackFrames; } |