[Info-vax] VMS Cobol - GnuCOBOL
John Reagan
xyzzy1959 at gmail.com
Mon Feb 27 22:35:05 EST 2023
On Monday, February 27, 2023 at 8:11:36 PM UTC-5, Robert A. Brooks wrote:
> On 2/27/2023 6:35 PM, Arne Vajhøj wrote:
>
> > But isn't that the case for all VMS compilers? I know
> > I use /DEB/NOOP for both Fortran, Pascal and C when I want
> > to debug.
> Reagan may weigh in here, but I'm pretty sure that DEC suggested using
> /DEBUG/NOOP when using the debugger for any language with an optimizer back in
> the 80's; if so, then that's been a pretty consistent message.
>
> --
>
> --- Rob
Debugging optimized code has been the Holy Grail for years. On Alpha, GEM and the debugger have
some attempt at make it possible but it wasn't perfect. Later DWARF standards have added additional
features for compilers to use to help convey the transformations used by the compiler, but it still a
challenge to present to the human in a way that makes sense. And of course, if the original source
program was technically illegal (which might be why you are in the debugger to start with), optimizers
will often do unspeakable transformations to such invalid programs.
So debugging unoptimized code helps you catch your algorithm errors (like subtracting one when you
should have added one). Finding things like uninitialized variables, free-after-use pointers, buffer
overruns, etc. often require more advanced tooling.
By the way, thanks to all the folks who've beat up on the native C compiler so far. And while we've
been discussing these fine topics here on c.o.v, the native Fortran compiler is about to appear. :)
More information about the Info-vax
mailing list