× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: Steve Richter
>
> I am curious to know how optimized code can guarantee the integrity of the
> program state when a breakpoint occurs.

Simple... it cannot.  As an example, read the help text for the OPTIMIZE
keyword of the CHGPGM command.  Here is the text for level 30:

"For ILE programs, some optimization is performed on ILE
programs.  When debugging ILE programs at this optimization
level, variables may be displayed, but the displayed value may
not be the current value.  Variables can also be changed but
using the variables changed at this level may cause unexpected
results.  An informational message is sent and no optimization
is performed when OPTIMIZE(*BASIC) is specified for original
program model (OPM) programs."

Level 40 is even cooler:

"This level includes all the optimizations performed at
optimization level 30 (*FULL).  In addition, it includes
optimization that disables call and instruction tracing.  Thus,
tracing of modules created at this optimization level cannot be
done.  Specifying OPTIMIZE(40) for OPM programs has the same
effect as specifying OPTIMIZE(*YES)."

As you can see, optimization by definition removes debuggability.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.