diff --git a/fast/driver/afcc.1 b/fast/driver/afcc.1 index 9575e5d9c..1826ae06f 100644 --- a/fast/driver/afcc.1 +++ b/fast/driver/afcc.1 @@ -21,6 +21,9 @@ afcc \- fast ACK compatible ANSI C compiler .B \-w ] [ +.B \-g +] +[ .B \-o .I outfile ] @@ -112,6 +115,9 @@ Name the final output file .br Remove any initial definition of .I name. +.IP \fB\-g\fP +.br +Produce symbolic debugging information for grind(1). .IP \fB\-v\fP .br Verbose. Print the commands as they are executed. @@ -132,5 +138,7 @@ can be freely mixed. B.W. Kernighan, D. Ritchie, "\fIThe C programming Language\fP", Prentice-Hall Inc., 1978 .IP [2] ack(1) manual page. +.IP [3] +grind(1) manual page. .SH DIAGNOSTICS Diagnostics are intended to be self-explanatory. diff --git a/fast/driver/afm2.1 b/fast/driver/afm2.1 index 1574014aa..431f0f07c 100644 --- a/fast/driver/afm2.1 +++ b/fast/driver/afm2.1 @@ -43,6 +43,9 @@ afm2 \- fast ACK compatible Modula-2 compiler .B \-_ ] [ +.B \-g +] +[ .BI \-U name ] [ @@ -162,6 +165,9 @@ Verbose, no execute. Only print the commands, do not execute them. .IP \fB\-L\fR do not generate code to keep track of the current location in the source code. +.IP \fB\-g\fP +.br +Produce symbolic debugging information for grind(1). .IP \fB\-w\fR\fIclasses\fR suppress warning messages whose class is a member of \fIclasses\fR. Currently, there are three classes: \fBO\fR, indicating old-flashioned use, @@ -197,5 +203,7 @@ N. Wirth, \fIProgramming in Modula-2\fP, 3rd edition, Springer Verlag. C.J.H. Jacobs, \fIThe ACK Modula-2 Compiler\fP. .IP [3] ack(1) unix manual page. +.IP [4] +grind(1) unix manual page. .SH DIAGNOSTICS Diagnostics are intended to be self-explanatory. diff --git a/fast/driver/afpc.1 b/fast/driver/afpc.1 index 8b8365389..f96d2e3e3 100644 --- a/fast/driver/afpc.1 +++ b/fast/driver/afpc.1 @@ -21,6 +21,9 @@ afpc \- fast ACK compatible Pascal compiler .B \-w ] [ +.B \-g +] +[ .B \-L ] [ @@ -165,6 +168,9 @@ Verbose, no execute. Only print the commands, do not execute them. .br do not generate code to keep track of the current location in the source code. +.IP \fB\-g\fP +.br +Produce symbolic debugging information for grind(1). .IP \fB\-w\fP .br suppress warning messages. @@ -215,5 +221,7 @@ use \fIcompiler\fR as Modula-2 compiler instead of the default. J.W. Stevenson, H. v. Eck, \fIAmsterdam Compiler Kit-Pascal reference manual\fP. .IP [2] ack(1) unix manual page. +.IP [3] +grind(1) unix manual page. .SH DIAGNOSTICS Diagnostics are intended to be self-explanatory. diff --git a/fast/driver/driver.c b/fast/driver/driver.c index d66bc2a8a..ae649b718 100644 --- a/fast/driver/driver.c +++ b/fast/driver/driver.c @@ -49,7 +49,11 @@ int kids = -1; int ecount = 0; struct arglist CPP_FLAGS = { +#ifdef FCC 7, +#else + 13, +#endif { "-D__unix", "-D_EM_WSIZE=4", @@ -58,6 +62,14 @@ struct arglist CPP_FLAGS = { "-D_EM_LSIZE=4", "-D_EM_FSIZE=4", "-D_EM_DSIZE=8", +#ifndef FCC + "-DEM_WSIZE=4", + "-DEM_PSIZE=4", + "-DEM_SSIZE=2", + "-DEM_LSIZE=4", + "-DEM_FSIZE=4", + "-DEM_DSIZE=8", +#endif } }; @@ -83,6 +95,7 @@ struct arglist CALL_VEC; int o_flag = 0; int c_flag = 0; +int g_flag = 0; int v_flag = 0; int O_flag = 0; @@ -132,6 +145,13 @@ lang_opt(str) { switch(str[1]) { case '-': /* debug options */ + append(&COMP_FLAGS, str); + return 1; + case 'a': /* ignore -ansi flag */ + if (! strcmp(str, "-ansi")) { + return 1; + } + break; case 'w': /* disable warnings */ if (str[2]) { str[1] = '-'; @@ -235,7 +255,7 @@ main(argc, argv) #endif FM2 #ifdef FCC strcat(INCLUDE, CCINCL); - append(&COMPFLAGS, "-L"); + append(&COMP_FLAGS, "-L"); #endif FCC #ifdef FPC INCLUDE[0] = '\0'; @@ -279,6 +299,10 @@ main(argc, argv) case 'I': /* include directory */ append(&CPP_FLAGS, str); break; + case 'g': /* debugger support */ + append(&COMP_FLAGS, str); + g_flag = 1; + break; case 'o': /* target file */ if (argc-- >= 0) { o_flag = 1; @@ -370,7 +394,7 @@ main(argc, argv) if (o_flag && c_flag) { f = o_FILE; } - else f = mkstr(ldfile, BASE, ".o", (char *)0); + else f = mkstr(ldfile, BASE, ".", "o", (char *)0); append(call, COMP); #ifdef FCC concat(call, &CPP_FLAGS); @@ -421,6 +445,7 @@ main(argc, argv) #ifdef FPC append(call, "-.p"); #endif + if (g_flag) append(call, "-g"); concat(call, &LD_FLAGS); concat(call, &LDFILES); if (runvec(call, (char *) 0) && GEN_LDFILES.al_argc == 1) diff --git a/fast/f_c.ansi/Parameters b/fast/f_c.ansi/Parameters index 95d1632a0..48c2f21d1 100644 --- a/fast/f_c.ansi/Parameters +++ b/fast/f_c.ansi/Parameters @@ -137,6 +137,6 @@ !File: dbsymtab.h -#undef DBSYMTAB 1 /* ability to produce symbol table for debugger */ +#define DBSYMTAB 1 /* ability to produce symbol table for debugger */ diff --git a/fast/f_m2/Parameters b/fast/f_m2/Parameters index 97c00c678..49891d2be 100644 --- a/fast/f_m2/Parameters +++ b/fast/f_m2/Parameters @@ -86,7 +86,7 @@ !File: dbsymtab.h -#undef DBSYMTAB 1 /* ability to produce symbol table for debugger */ +#define DBSYMTAB 1 /* ability to produce symbol table for debugger */ !File: use_insert.h diff --git a/fast/f_pc/Parameters b/fast/f_pc/Parameters index 91ee802f3..d2545e832 100644 --- a/fast/f_pc/Parameters +++ b/fast/f_pc/Parameters @@ -58,4 +58,4 @@ !File: dbsymtab.h -#undef DBSYMTAB 1 /* ability to produce symbol table for debugger */ +#define DBSYMTAB 1 /* ability to produce symbol table for debugger */