*/
+!File: dbsymtab.h
+#define DBSYMTAB 1 /* ability to produce symbol table for debugger */
+
+
OPTIM = -O
CFLAGS = $(PROFILE) $(INCLUDES) $(COPTIONS) $(OPTIM)
LINTFLAGS =
-LDFLAGS = -i $(PROFILE)
+LDFLAGS = $(PROFILE)
LSRC = tokenfile.c program.c declar.c expression.c statement.c
LOBJ = tokenfile.o program.o declar.o expression.o statement.o
LLlex.o: bigparam.h
LLlex.o: class.h
LLlex.o: const.h
+LLlex.o: dbsymtab.h
LLlex.o: debug.h
LLlex.o: debugcst.h
LLlex.o: def.h
main.o: Lpars.h
main.o: SYSTEM.h
main.o: bigparam.h
+main.o: dbsymtab.h
main.o: debug.h
main.o: debugcst.h
main.o: def.h
type.o: bigparam.h
type.o: chk_expr.h
type.o: const.h
+type.o: dbsymtab.h
type.o: debug.h
type.o: debugcst.h
type.o: def.h
def.o: LLlex.h
def.o: Lpars.h
def.o: bigparam.h
+def.o: dbsymtab.h
def.o: debug.h
def.o: debugcst.h
def.o: def.h
misc.o: real.h
enter.o: LLlex.h
enter.o: bigparam.h
+enter.o: dbsymtab.h
enter.o: debug.h
enter.o: debugcst.h
enter.o: def.h
defmodule.o: LLlex.h
defmodule.o: Lpars.h
defmodule.o: bigparam.h
+defmodule.o: dbsymtab.h
defmodule.o: debug.h
defmodule.o: debugcst.h
defmodule.o: def.h
defmodule.o: type.h
typequiv.o: LLlex.h
typequiv.o: bigparam.h
+typequiv.o: dbsymtab.h
typequiv.o: debug.h
typequiv.o: debugcst.h
typequiv.o: def.h
typequiv.o: warning.h
node.o: LLlex.h
node.o: bigparam.h
+node.o: dbsymtab.h
node.o: debug.h
node.o: debugcst.h
node.o: def.h
cstoper.o: Lpars.h
cstoper.o: bigparam.h
cstoper.o: const.h
+cstoper.o: dbsymtab.h
cstoper.o: debug.h
cstoper.o: debugcst.h
cstoper.o: idf.h
chk_expr.o: bigparam.h
chk_expr.o: chk_expr.h
chk_expr.o: const.h
+chk_expr.o: dbsymtab.h
chk_expr.o: debug.h
chk_expr.o: debugcst.h
chk_expr.o: def.h
chk_expr.o: warning.h
options.o: bigparam.h
options.o: class.h
+options.o: dbsymtab.h
options.o: idfsize.h
options.o: main.h
options.o: nocross.h
walk.o: bigparam.h
walk.o: bigresult.h
walk.o: chk_expr.h
+walk.o: dbsymtab.h
walk.o: debug.h
walk.o: debugcst.h
walk.o: def.h
walk.o: warning.h
desig.o: LLlex.h
desig.o: bigparam.h
+desig.o: dbsymtab.h
desig.o: debug.h
desig.o: debugcst.h
desig.o: def.h
code.o: Lpars.h
code.o: bigparam.h
code.o: bigresult.h
+code.o: dbsymtab.h
code.o: debug.h
code.o: debugcst.h
code.o: def.h
code.o: walk.h
lookup.o: LLlex.h
lookup.o: bigparam.h
+lookup.o: dbsymtab.h
lookup.o: debug.h
lookup.o: debugcst.h
lookup.o: def.h
stab.o: LLlex.h
stab.o: bigparam.h
stab.o: const.h
+stab.o: dbsymtab.h
stab.o: def.h
stab.o: idf.h
+stab.o: main.h
stab.o: nocross.h
stab.o: real.h
stab.o: scope.h
program.o: LLlex.h
program.o: Lpars.h
program.o: bigparam.h
+program.o: dbsymtab.h
program.o: debug.h
program.o: debugcst.h
program.o: def.h
program.o: f_info.h
program.o: idf.h
program.o: main.h
+program.o: misc.h
program.o: nocross.h
program.o: node.h
program.o: real.h
declar.o: Lpars.h
declar.o: bigparam.h
declar.o: chk_expr.h
+declar.o: dbsymtab.h
declar.o: debug.h
declar.o: debugcst.h
declar.o: def.h
expression.o: bigparam.h
expression.o: chk_expr.h
expression.o: const.h
+expression.o: dbsymtab.h
expression.o: debug.h
expression.o: debugcst.h
expression.o: def.h
statement.o: LLlex.h
statement.o: Lpars.h
statement.o: bigparam.h
+statement.o: dbsymtab.h
statement.o: def.h
statement.o: idf.h
statement.o: nocross.h
casestat.o: Lpars.h
casestat.o: bigparam.h
casestat.o: chk_expr.h
+casestat.o: dbsymtab.h
casestat.o: debug.h
casestat.o: debugcst.h
casestat.o: def.h
casestat.o: walk.h
tmpvar.o: LLlex.h
tmpvar.o: bigparam.h
+tmpvar.o: dbsymtab.h
tmpvar.o: debug.h
tmpvar.o: debugcst.h
tmpvar.o: def.h
tmpvar.o: type.h
scope.o: LLlex.h
scope.o: bigparam.h
+scope.o: dbsymtab.h
scope.o: debug.h
scope.o: debugcst.h
scope.o: def.h
returns a pointer to it
*/
+!File: dbsymtab.h
+#undef DBSYMTAB 1 /* ability to produce symbol table for debugger */
+
#include <assert.h>
#include "strict3rd.h"
+#include "dbsymtab.h"
#include "idf.h"
#include "LLlex.h"
#include "def.h"
|
{ ++proclevel; }
ProcedureHeading(&df, D_PROCEDURE)
- { if (options['g']) stb_string(df, D_PROCEDURE); }
+ {
+#ifdef DBSYMTAB
+ if (options['g']) stb_string(df, D_PROCEDURE);
+#endif /* DBSYMTAB */
+ }
';'
block(&(df->prc_body))
IDENT
- { if (options['g']) stb_string(df, D_PEND);
+ {
+#ifdef DBSYMTAB
+ if (options['g']) stb_string(df, D_PEND);
+#endif /* DBSYMTAB */
EndProc(df, dot.TOK_IDF);
--proclevel;
}
'=' type(&tp)
{ DeclareType(nd, df, tp);
FreeNode(nd);
+#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_TYPE);
+#endif /* DBSYMTAB */
}
;
df->con_const = nd->nd_token;
df->df_type = nd->nd_type;
FreeNode(nd);
+#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_CONST);
+#endif /* DBSYMTAB */
}
;
#include <em_code.h>
#include <assert.h>
+#include "dbsymtab.h"
#include "idf.h"
#include "LLlex.h"
#include "def.h"
df = define(str2idf(name, 0), CurrentScope, kind);
df->df_type = type;
if (pnam) df->df_value.df_stdname = pnam;
+#ifdef DBSYMTAB
else if (options['g']) stb_string(df, kind);
+#endif /* DBSYMTAB */
return df;
}
C_ina_dnam(df->var_name);
}
}
+#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_VARIABLE);
+#endif /* DBSYMTAB */
}
FreeNode(Idlist);
}
#include <stb.h>
#include "strict3rd.h"
+#include "dbsymtab.h"
#include "input.h"
#include "f_info.h"
#include "idf.h"
if (! C_open(dst)) fatal("could not open output file");
C_magic();
C_ms_emx(word_size, pointer_size);
+#ifdef DBSYMTAB
if (options['g']) {
C_ms_std(FileName, N_SO, 0);
}
+#endif /* DBSYMTAB */
init_idf();
InitCst();
reserve(tkidf);
#include <alloc.h>
#include "strict3rd.h"
+#include "dbsymtab.h"
#include "type.h"
#include "main.h"
#include "warning.h"
options[text[-1]]++;
break;
+#ifdef DBSYMTAB
case 'g': /* generate symbol table for debugger */
options['g']++;
options['n']++; /* no register vars ??? */
break;
+#endif /* DBSYMTAB */
case 'w':
if (*text) {
#include <stb.h>
#include "strict3rd.h"
+#include "dbsymtab.h"
#include "main.h"
#include "idf.h"
#include "LLlex.h"
';'
import(1)*
export(&qualified, &exportlist)
- { if (options['g']) stb_string(df, D_MODULE); }
+ {
+#ifdef DBSYMTAB
+ if (options['g']) stb_string(df, D_MODULE);
+#endif /* DBSYMTAB */
+ }
block(&(df->mod_body))
IDENT { EnterExportList(exportlist, qualified);
+#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_END);
+#endif /* DBSYMTAB */
close_scope(SC_CHKFORW|SC_CHKPROC|SC_REVERSE);
match_id(df->df_idf, dot.TOK_IDF);
}
DefinitionModule++;
if (!Defined) {
Defined = df;
+#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_MODULE);
+#endif /* DBSYMTAB */
}
}
';'
}
]
';'
- { if (options['g']) stb_string(df, D_TYPE); }
+ {
+#ifdef DBSYMTAB
+ if (options['g']) stb_string(df, D_TYPE);
+#endif /* DBSYMTAB */
+ }
]*
|
VAR [ %persistent VariableDeclaration ';' ]*
df->mod_vis = CurrVis;
CurrentScope->sc_name = "__M2M_";
CurrentScope->sc_definedby = df;
+#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_MODULE);
+#endif /* DBSYMTAB */
}
}
priority(&(df->mod_priority))
';' import(0)*
block(&(df->mod_body)) IDENT
- { if (options['g']) {
+ {
+#ifdef DBSYMTAB
+ if (options['g']) {
if (state == PROGRAM) {
C_ms_stb_cst(df->df_idf->id_text,
N_MAIN,
}
stb_string(df, D_END);
}
+#endif /* DBSYMTAB */
close_scope(SC_CHKFORW|SC_CHKPROC|SC_REVERSE);
match_id(df->df_idf, dot.TOK_IDF);
}
/* $Header$ */
+#include "dbsymtab.h"
+
+#ifdef DBSYMTAB
+
#include <alloc.h>
#include <em_arith.h>
#include <em_label.h>
}
}
+#endif /* DBSYMTAB */
/* $Header$ */
+#include "dbsymtab.h"
+
struct paramlist { /* structure for parameterlist of a PROCEDURE */
struct paramlist *par_next;
struct def *par_def; /* "df" of parameter */
#define T_INDEX (T_ENUMERATION|T_CHAR|T_SUBRANGE)
#define T_DISCRETE (T_INDEX|T_INTORCARD)
#define T_CONSTRUCTED (T_ARRAY|T_SET|T_RECORD)
+#ifdef DBSYMTAB
short tp_dbindex; /* index in debugger symbol table */
+#endif
int tp_align; /* alignment requirement of this type */
arith tp_size; /* size of this type */
union {
#include <stb.h>
#include "strict3rd.h"
+#include "dbsymtab.h"
#include "LLlex.h"
#include "def.h"
#include "type.h"
nd->nd_lineno != oldlineno) {
oldlineno = nd->nd_lineno;
if (! options['L']) C_lin((arith) nd->nd_lineno);
+#ifdef DBSYMTAB
if ( options['g']) {
static int ms_lineno;
ms_lineno = nd->nd_lineno;
}
}
+#endif /* DBSYMTAB */
}
}
}
WalkDefList(sc->sc_def, MkCalls);
proclevel++;
+#ifdef DBSYMTAB
if (options['g']) {
C_ms_std((char *) 0, N_LBRAC, proclevel);
}
+#endif /* DBSYMTAB */
WalkNode(module->mod_body, NO_EXIT_LABEL, REACH_FLAG);
DO_DEBUG(options['X'], PrNode(module->mod_body, 0));
def_ilb(RETURN_LABEL);
EndPriority();
C_ret((arith) 0);
+#ifdef DBSYMTAB
if (options['g']) {
C_ms_std((char *) 0, N_RBRAC, proclevel);
}
+#endif /* DBSYMTAB */
C_end(-sc->sc_off);
proclevel--;
TmpClose();
C_ret(func_res_size);
C_beginpart(partno2);
C_pro(procscope->sc_name, -procscope->sc_off);
+#ifdef DBSYMTAB
if (options['g']) {
C_ms_std((char *) 0, N_LBRAC, proclevel);
}
+#endif /* DBSYMTAB */
C_ms_par(procedure->df_type->prc_nbpar
#ifdef BIG_RESULT_ON_STACK
+ (too_big ? func_res_size : 0)
);
if (! options['n']) WalkDefList(procscope->sc_def, RegisterMessage);
C_endpart(partno2);
+#ifdef DBSYMTAB
if (options['g']) {
C_ms_std((char *) 0, N_RBRAC, proclevel);
}
+#endif /* DBSYMTAB */
C_end(-procscope->sc_off);
if (! fit(procscope->sc_off, (int) word_size)) {
node_error(procedure->prc_body,