Skip to content

Commit

Permalink
Backport GC4 new dump feature tu GC3
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Jan 16, 2024
1 parent c0d64ad commit 5ae290b
Show file tree
Hide file tree
Showing 7 changed files with 861 additions and 62 deletions.
11 changes: 11 additions & 0 deletions cobc/cobc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,8 @@ cobc_def_dump_opts (const char *opt, const int on)
} else {
cb_flag_dump = COB_DUMP_NONE;
}
if (cb_flag_dump)
cb_flag_symbols = 1;
return;
}

Expand Down Expand Up @@ -2823,6 +2825,8 @@ cobc_def_dump_opts (const char *opt, const int on)
} else {
cb_flag_dump ^= dump_to_set;
}
if (cb_flag_dump)
cb_flag_symbols = 1;
cobc_free (p);
}

Expand Down Expand Up @@ -3256,6 +3260,7 @@ process_command_line (const int argc, char **argv)
cb_flag_c_line_directives = 1;
cb_flag_c_labels = 1;
#endif
cb_flag_symbols = 1;
#ifdef COB_DEBUG_FLAGS
COBC_ADD_STR (cobc_cflags, " ", cobc_debug_flags, NULL);
#endif
Expand All @@ -3267,6 +3272,7 @@ process_command_line (const int argc, char **argv)
cb_flag_stack_extended = 1;
cb_flag_stack_check = 1;
cb_flag_memory_check = CB_MEMCHK_ALL;
cb_flag_symbols = 1;
cobc_wants_debug = 1;
break;

Expand Down Expand Up @@ -4198,6 +4204,9 @@ process_command_line (const int argc, char **argv)
cb_flag_trace = 1;
cb_flag_source_location = 1;
}
if (cb_flag_trace) {
cb_flag_symbols = 1;
}

/* If C debug, never strip output */
if (cb_source_debugging) {
Expand Down Expand Up @@ -8937,6 +8946,8 @@ finish_setup_compiler_env (void)

if (getenv ("COBC_GEN_DUMP_COMMENTS")) {
cb_wants_dump_comments = 1;
/* Disable "new" symbol table if requesting dump comments */
cb_flag_symbols = 0;
}
}

Expand Down
10 changes: 0 additions & 10 deletions cobc/cobc.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,6 @@ extern int cb_ml_tree_id;
extern int cb_flag_functions_all;

extern int cb_flag_dump;
#define COB_DUMP_NONE 0x0000 /* No dump */
#define COB_DUMP_FD 0x0001 /* FILE SECTION -> FILE DESCRIPTION */
#define COB_DUMP_WS 0x0002 /* WORKING-STORAGE SECTION */
#define COB_DUMP_RD 0x0004 /* REPORT SECTION */
#define COB_DUMP_SD 0x0008 /* FILE SECTION -> SORT DESCRIPTION */
#define COB_DUMP_SC 0x0010 /* SCREEN SECTION */
#define COB_DUMP_LS 0x0020 /* LINKAGE SECTION */
#define COB_DUMP_LO 0x0040 /* LOCAL-STORAGE SECTION */
#define COB_DUMP_ALL (COB_DUMP_FD|COB_DUMP_WS|COB_DUMP_RD|COB_DUMP_SD|COB_DUMP_SC|COB_DUMP_LS|COB_DUMP_LO)


extern int cb_unix_lf;

Expand Down
Loading

0 comments on commit 5ae290b

Please sign in to comment.