You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For GnuCOBOL 3.1 we previously could use -fdump to force generation of more fields, even if they aren't directly referenced.
But entries that are related to REDEFINES / level 66 are never part of the dump, level 78 aren't either - and the actual dump on abort may be unwanted (should only be done if the user compiled with those flags).
COBC_GEN_DUMP_COMMENTS solves this by generating everything not requested and the additional fields mentioned above as a C comment, instead of an actual executed code. And it additionally generates information about the fields attributes REDEFINES BASED EXTERNAL GLOBAL ANYLENGTH OCCURS min max [-1 for unbounded] in the dump code:
always set COBC_GEN_DUMP_COMMENTS in the process that invokes cobc to generate debug modules
adjust this extension's scanner to use as much as possible from this information, this may also help with handling OCCURS support for OCCURS #38
Note: the current GnuCOBOL CI snapshot includes this already, for tests on Windows the CI generated MinGW package can be used.
GnuCOBOL 3.1 final release is expected within the next days.
The text was updated successfully, but these errors were encountered:
As that's were the initial implementation of the "cob_field" variant came from; @brunopacheco1 can you please have a look at this? Always setting this environment variable before calling cobc will do no harm; the actual main adjustment is likely to parse the generated dump part to know about all the fields (instead of primarily searching the header for its definition) and to also do this from the comments).
Note: if we need the knowledge "is that possible": GC 3.1.1 also implements a function to query the version: libcob_version()- if that function is available the extended dump code [possibly as comment only, if -fdump option was not used at compile-time] is also generated - but maybe that's not necessary to know: always export the variable during compile, always look for the code/comment (in the P_dump label), if it isn't there [or always?] fallback to reading the data from the header.
For GnuCOBOL 3.1 we previously could use -fdump to force generation of more fields, even if they aren't directly referenced.
But entries that are related to REDEFINES / level 66 are never part of the dump, level 78 aren't either - and the actual dump on abort may be unwanted (should only be done if the user compiled with those flags).
COBC_GEN_DUMP_COMMENTS
solves this by generating everything not requested and the additional fields mentioned above as a C comment, instead of an actual executed code. And it additionally generates information about the fields attributes REDEFINES BASED EXTERNAL GLOBAL ANYLENGTH OCCURS min max [-1 for unbounded] in the dump code:I suggest to:
COBC_GEN_DUMP_COMMENTS
in the process that invokes cobc to generate debug modulesNote: the current GnuCOBOL CI snapshot includes this already, for tests on Windows the CI generated MinGW package can be used.
GnuCOBOL 3.1 final release is expected within the next days.
The text was updated successfully, but these errors were encountered: