From: <bi...@us...> - 2008-06-01 16:01:53
|
Revision: 2508 http://oorexx.svn.sourceforge.net/oorexx/?rev=2508&view=rev Author: bigrixx Date: 2008-06-01 09:02:00 -0700 (Sun, 01 Jun 2008) Log Message: ----------- [ 1980196 ] Interactive label trace doesn't work [ 1908020 ] RXTRACE environment symbol crashes interpreter Modified Paths: -------------- interpreter-3.x/trunk/kernel/instructions/LabelInstruction.cpp interpreter-3.x/trunk/kernel/runtime/RexxActivation.cpp Modified: interpreter-3.x/trunk/kernel/instructions/LabelInstruction.cpp =================================================================== --- interpreter-3.x/trunk/kernel/instructions/LabelInstruction.cpp 2008-05-29 21:47:08 UTC (rev 2507) +++ interpreter-3.x/trunk/kernel/instructions/LabelInstruction.cpp 2008-06-01 16:02:00 UTC (rev 2508) @@ -36,7 +36,7 @@ /* */ /*----------------------------------------------------------------------------*/ /******************************************************************************/ -/* REXX Translator LabelInstruction.c */ +/* REXX Translator LabelInstruction.c */ /* */ /* Primitive Label Parse Class */ /* */ @@ -54,6 +54,6 @@ /****************************************************************************/ { context->traceLabel(this); /* trace if necessary */ - context->pauseInstruction(); /* pause if in debug mode */ + context->pauseLabel(); /* pause if in debug mode */ } Modified: interpreter-3.x/trunk/kernel/runtime/RexxActivation.cpp =================================================================== --- interpreter-3.x/trunk/kernel/runtime/RexxActivation.cpp 2008-05-29 21:47:08 UTC (rev 2507) +++ interpreter-3.x/trunk/kernel/runtime/RexxActivation.cpp 2008-06-01 16:02:00 UTC (rev 2508) @@ -3239,63 +3239,80 @@ /* Function: Process an individual debug pause for an instruction */ /******************************************************************************/ { - RexxString * response; /* response to the debug prompt */ - RexxInstruction * currentInst; /* current instruction */ + RexxString * response; /* response to the debug prompt */ + RexxInstruction * currentInst; /* current instruction */ - if (this->debug_pause) /* instruction during debug pause? */ - return false; /* just get out quick */ + if (this->debug_pause) /* instruction during debug pause? */ + { + return false; /* just get out quick */ + } - if (this->settings.flags&debug_bypass) - /* turn off for the next time */ - this->settings.flags &= ~debug_bypass; - /* debug pauses suppressed? */ - else if (this->settings.trace_skip > 0) { - this->settings.trace_skip--; /* account for this one */ - if (this->settings.trace_skip == 0)/* gone to zero? */ - /* turn tracing back on again (this */ - /* ensures the next pause also has */ - /* the instruction traced */ - this->settings.flags &= ~trace_suppress; - } - else { /* real work to do */ - if (!this->code->isTraceable()) /* if we don't have real source */ - return false; /* just ignore for this */ - /* newly into debug mode? */ - if (!(this->settings.flags&debug_prompt_issued)) { - /* write the initial prompt */ - this->activity->traceOutput(this, (RexxString *)SysMessageText(Message_Translations_debug_prompt)); - /* remember we've issued this */ - this->settings.flags |= debug_prompt_issued; + if (this->settings.flags&debug_bypass) + { + /* turn off for the next time */ + this->settings.flags &= ~debug_bypass; } - currentInst = this->next; /* save the next location target */ - for (;;) { /* loop until no longer pausing */ - /* read a line from the screen */ - do { - response = this->activity->traceInput(this); - } while (!(this->settings.flags&halt_condition)); + /* debug pauses suppressed? */ + else if (this->settings.trace_skip > 0) + { + this->settings.trace_skip--; /* account for this one */ + if (this->settings.trace_skip == 0)/* gone to zero? */ + { + /* turn tracing back on again (this */ + /* ensures the next pause also has */ + /* the instruction traced */ + this->settings.flags &= ~trace_suppress; + } + } + else + { /* real work to do */ + if (!this->code->isTraceable()) /* if we don't have real source */ + { + return false; /* just ignore for this */ + } + /* newly into debug mode? */ + if (!(this->settings.flags&debug_prompt_issued)) + { + /* write the initial prompt */ + this->activity->traceOutput(this, (RexxString *)SysMessageText(Message_Translations_debug_prompt)); + /* remember we've issued this */ + this->settings.flags |= debug_prompt_issued; + } + currentInst = this->next; /* save the next location target */ + for (;;) + { /* loop until no longer pausing */ + /* read a line from the screen */ + response = this->activity->traceInput(this); - if (response->getLength() == 0) /* just a "null" line entered? */ - break; /* just end the pausing */ - /* a re-execute request? */ - else if (response->getLength() == 1 && response->getChar(0) == '=') { - this->next = this->current; /* reset the execution pointer */ - return true; /* finished (inform block instrs) */ - } - else { /* need to execute an instruction */ - this->debugInterpret(response);/* go execute this */ - if (currentInst != this->next) /* flow of control change? */ - break; /* end of this pause */ - /* has the use changed the trace */ - /* setting on us? */ - else if (this->settings.flags&debug_bypass) { - /* turn off for the next time */ - this->settings.flags &= ~debug_bypass; - break; /* we also skip repausing */ + if (response->getLength() == 0) /* just a "null" line entered? */ + { + break; /* just end the pausing */ + } + /* a re-execute request? */ + else if (response->getLength() == 1 && response->getChar(0) == '=') + { + this->next = this->current; /* reset the execution pointer */ + return true; /* finished (inform block instrs) */ + } + else + { /* need to execute an instruction */ + this->debugInterpret(response);/* go execute this */ + if (currentInst != this->next) /* flow of control change? */ + { + break; /* end of this pause */ + } + /* has the use changed the trace */ + /* setting on us? */ + else if (this->settings.flags&debug_bypass) + { + /* turn off for the next time */ + this->settings.flags &= ~debug_bypass; + break; /* we also skip repausing */ + } + } } - } } - } - return false; /* no re-execute */ + return false; /* no re-execute */ } void RexxActivation::traceClause( /* trace a REXX instruction */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |