Made ability for -g dependant on compile-time flag
This commit is contained in:
parent
b4f4a87846
commit
c40ca6ebbd
11 changed files with 99 additions and 6 deletions
|
@ -91,3 +91,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
!File: dbsymtab.h
|
||||||
|
#define DBSYMTAB 1 /* ability to produce symbol table for debugger */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ INCLUDES = -I$(MHDIR) -I$(EMHOME)/h -I$(PKGDIR)
|
||||||
OPTIM = -O
|
OPTIM = -O
|
||||||
CFLAGS = $(PROFILE) $(INCLUDES) $(COPTIONS) $(OPTIM)
|
CFLAGS = $(PROFILE) $(INCLUDES) $(COPTIONS) $(OPTIM)
|
||||||
LINTFLAGS =
|
LINTFLAGS =
|
||||||
LDFLAGS = -i $(PROFILE)
|
LDFLAGS = $(PROFILE)
|
||||||
|
|
||||||
LSRC = tokenfile.c program.c declar.c expression.c statement.c
|
LSRC = tokenfile.c program.c declar.c expression.c statement.c
|
||||||
LOBJ = tokenfile.o program.o declar.o expression.o statement.o
|
LOBJ = tokenfile.o program.o declar.o expression.o statement.o
|
||||||
|
@ -212,6 +212,7 @@ LLlex.o: Lpars.h
|
||||||
LLlex.o: bigparam.h
|
LLlex.o: bigparam.h
|
||||||
LLlex.o: class.h
|
LLlex.o: class.h
|
||||||
LLlex.o: const.h
|
LLlex.o: const.h
|
||||||
|
LLlex.o: dbsymtab.h
|
||||||
LLlex.o: debug.h
|
LLlex.o: debug.h
|
||||||
LLlex.o: debugcst.h
|
LLlex.o: debugcst.h
|
||||||
LLlex.o: def.h
|
LLlex.o: def.h
|
||||||
|
@ -248,6 +249,7 @@ main.o: LLlex.h
|
||||||
main.o: Lpars.h
|
main.o: Lpars.h
|
||||||
main.o: SYSTEM.h
|
main.o: SYSTEM.h
|
||||||
main.o: bigparam.h
|
main.o: bigparam.h
|
||||||
|
main.o: dbsymtab.h
|
||||||
main.o: debug.h
|
main.o: debug.h
|
||||||
main.o: debugcst.h
|
main.o: debugcst.h
|
||||||
main.o: def.h
|
main.o: def.h
|
||||||
|
@ -276,6 +278,7 @@ type.o: LLlex.h
|
||||||
type.o: bigparam.h
|
type.o: bigparam.h
|
||||||
type.o: chk_expr.h
|
type.o: chk_expr.h
|
||||||
type.o: const.h
|
type.o: const.h
|
||||||
|
type.o: dbsymtab.h
|
||||||
type.o: debug.h
|
type.o: debug.h
|
||||||
type.o: debugcst.h
|
type.o: debugcst.h
|
||||||
type.o: def.h
|
type.o: def.h
|
||||||
|
@ -293,6 +296,7 @@ type.o: warning.h
|
||||||
def.o: LLlex.h
|
def.o: LLlex.h
|
||||||
def.o: Lpars.h
|
def.o: Lpars.h
|
||||||
def.o: bigparam.h
|
def.o: bigparam.h
|
||||||
|
def.o: dbsymtab.h
|
||||||
def.o: debug.h
|
def.o: debug.h
|
||||||
def.o: debugcst.h
|
def.o: debugcst.h
|
||||||
def.o: def.h
|
def.o: def.h
|
||||||
|
@ -313,6 +317,7 @@ misc.o: node.h
|
||||||
misc.o: real.h
|
misc.o: real.h
|
||||||
enter.o: LLlex.h
|
enter.o: LLlex.h
|
||||||
enter.o: bigparam.h
|
enter.o: bigparam.h
|
||||||
|
enter.o: dbsymtab.h
|
||||||
enter.o: debug.h
|
enter.o: debug.h
|
||||||
enter.o: debugcst.h
|
enter.o: debugcst.h
|
||||||
enter.o: def.h
|
enter.o: def.h
|
||||||
|
@ -329,6 +334,7 @@ enter.o: type.h
|
||||||
defmodule.o: LLlex.h
|
defmodule.o: LLlex.h
|
||||||
defmodule.o: Lpars.h
|
defmodule.o: Lpars.h
|
||||||
defmodule.o: bigparam.h
|
defmodule.o: bigparam.h
|
||||||
|
defmodule.o: dbsymtab.h
|
||||||
defmodule.o: debug.h
|
defmodule.o: debug.h
|
||||||
defmodule.o: debugcst.h
|
defmodule.o: debugcst.h
|
||||||
defmodule.o: def.h
|
defmodule.o: def.h
|
||||||
|
@ -346,6 +352,7 @@ defmodule.o: target_sizes.h
|
||||||
defmodule.o: type.h
|
defmodule.o: type.h
|
||||||
typequiv.o: LLlex.h
|
typequiv.o: LLlex.h
|
||||||
typequiv.o: bigparam.h
|
typequiv.o: bigparam.h
|
||||||
|
typequiv.o: dbsymtab.h
|
||||||
typequiv.o: debug.h
|
typequiv.o: debug.h
|
||||||
typequiv.o: debugcst.h
|
typequiv.o: debugcst.h
|
||||||
typequiv.o: def.h
|
typequiv.o: def.h
|
||||||
|
@ -360,6 +367,7 @@ typequiv.o: type.h
|
||||||
typequiv.o: warning.h
|
typequiv.o: warning.h
|
||||||
node.o: LLlex.h
|
node.o: LLlex.h
|
||||||
node.o: bigparam.h
|
node.o: bigparam.h
|
||||||
|
node.o: dbsymtab.h
|
||||||
node.o: debug.h
|
node.o: debug.h
|
||||||
node.o: debugcst.h
|
node.o: debugcst.h
|
||||||
node.o: def.h
|
node.o: def.h
|
||||||
|
@ -373,6 +381,7 @@ cstoper.o: LLlex.h
|
||||||
cstoper.o: Lpars.h
|
cstoper.o: Lpars.h
|
||||||
cstoper.o: bigparam.h
|
cstoper.o: bigparam.h
|
||||||
cstoper.o: const.h
|
cstoper.o: const.h
|
||||||
|
cstoper.o: dbsymtab.h
|
||||||
cstoper.o: debug.h
|
cstoper.o: debug.h
|
||||||
cstoper.o: debugcst.h
|
cstoper.o: debugcst.h
|
||||||
cstoper.o: idf.h
|
cstoper.o: idf.h
|
||||||
|
@ -388,6 +397,7 @@ chk_expr.o: Lpars.h
|
||||||
chk_expr.o: bigparam.h
|
chk_expr.o: bigparam.h
|
||||||
chk_expr.o: chk_expr.h
|
chk_expr.o: chk_expr.h
|
||||||
chk_expr.o: const.h
|
chk_expr.o: const.h
|
||||||
|
chk_expr.o: dbsymtab.h
|
||||||
chk_expr.o: debug.h
|
chk_expr.o: debug.h
|
||||||
chk_expr.o: debugcst.h
|
chk_expr.o: debugcst.h
|
||||||
chk_expr.o: def.h
|
chk_expr.o: def.h
|
||||||
|
@ -406,6 +416,7 @@ chk_expr.o: type.h
|
||||||
chk_expr.o: warning.h
|
chk_expr.o: warning.h
|
||||||
options.o: bigparam.h
|
options.o: bigparam.h
|
||||||
options.o: class.h
|
options.o: class.h
|
||||||
|
options.o: dbsymtab.h
|
||||||
options.o: idfsize.h
|
options.o: idfsize.h
|
||||||
options.o: main.h
|
options.o: main.h
|
||||||
options.o: nocross.h
|
options.o: nocross.h
|
||||||
|
@ -420,6 +431,7 @@ walk.o: Lpars.h
|
||||||
walk.o: bigparam.h
|
walk.o: bigparam.h
|
||||||
walk.o: bigresult.h
|
walk.o: bigresult.h
|
||||||
walk.o: chk_expr.h
|
walk.o: chk_expr.h
|
||||||
|
walk.o: dbsymtab.h
|
||||||
walk.o: debug.h
|
walk.o: debug.h
|
||||||
walk.o: debugcst.h
|
walk.o: debugcst.h
|
||||||
walk.o: def.h
|
walk.o: def.h
|
||||||
|
@ -440,6 +452,7 @@ walk.o: walk.h
|
||||||
walk.o: warning.h
|
walk.o: warning.h
|
||||||
desig.o: LLlex.h
|
desig.o: LLlex.h
|
||||||
desig.o: bigparam.h
|
desig.o: bigparam.h
|
||||||
|
desig.o: dbsymtab.h
|
||||||
desig.o: debug.h
|
desig.o: debug.h
|
||||||
desig.o: debugcst.h
|
desig.o: debugcst.h
|
||||||
desig.o: def.h
|
desig.o: def.h
|
||||||
|
@ -457,6 +470,7 @@ code.o: LLlex.h
|
||||||
code.o: Lpars.h
|
code.o: Lpars.h
|
||||||
code.o: bigparam.h
|
code.o: bigparam.h
|
||||||
code.o: bigresult.h
|
code.o: bigresult.h
|
||||||
|
code.o: dbsymtab.h
|
||||||
code.o: debug.h
|
code.o: debug.h
|
||||||
code.o: debugcst.h
|
code.o: debugcst.h
|
||||||
code.o: def.h
|
code.o: def.h
|
||||||
|
@ -472,6 +486,7 @@ code.o: type.h
|
||||||
code.o: walk.h
|
code.o: walk.h
|
||||||
lookup.o: LLlex.h
|
lookup.o: LLlex.h
|
||||||
lookup.o: bigparam.h
|
lookup.o: bigparam.h
|
||||||
|
lookup.o: dbsymtab.h
|
||||||
lookup.o: debug.h
|
lookup.o: debug.h
|
||||||
lookup.o: debugcst.h
|
lookup.o: debugcst.h
|
||||||
lookup.o: def.h
|
lookup.o: def.h
|
||||||
|
@ -486,8 +501,10 @@ lookup.o: type.h
|
||||||
stab.o: LLlex.h
|
stab.o: LLlex.h
|
||||||
stab.o: bigparam.h
|
stab.o: bigparam.h
|
||||||
stab.o: const.h
|
stab.o: const.h
|
||||||
|
stab.o: dbsymtab.h
|
||||||
stab.o: def.h
|
stab.o: def.h
|
||||||
stab.o: idf.h
|
stab.o: idf.h
|
||||||
|
stab.o: main.h
|
||||||
stab.o: nocross.h
|
stab.o: nocross.h
|
||||||
stab.o: real.h
|
stab.o: real.h
|
||||||
stab.o: scope.h
|
stab.o: scope.h
|
||||||
|
@ -497,12 +514,14 @@ tokenfile.o: Lpars.h
|
||||||
program.o: LLlex.h
|
program.o: LLlex.h
|
||||||
program.o: Lpars.h
|
program.o: Lpars.h
|
||||||
program.o: bigparam.h
|
program.o: bigparam.h
|
||||||
|
program.o: dbsymtab.h
|
||||||
program.o: debug.h
|
program.o: debug.h
|
||||||
program.o: debugcst.h
|
program.o: debugcst.h
|
||||||
program.o: def.h
|
program.o: def.h
|
||||||
program.o: f_info.h
|
program.o: f_info.h
|
||||||
program.o: idf.h
|
program.o: idf.h
|
||||||
program.o: main.h
|
program.o: main.h
|
||||||
|
program.o: misc.h
|
||||||
program.o: nocross.h
|
program.o: nocross.h
|
||||||
program.o: node.h
|
program.o: node.h
|
||||||
program.o: real.h
|
program.o: real.h
|
||||||
|
@ -515,6 +534,7 @@ declar.o: LLlex.h
|
||||||
declar.o: Lpars.h
|
declar.o: Lpars.h
|
||||||
declar.o: bigparam.h
|
declar.o: bigparam.h
|
||||||
declar.o: chk_expr.h
|
declar.o: chk_expr.h
|
||||||
|
declar.o: dbsymtab.h
|
||||||
declar.o: debug.h
|
declar.o: debug.h
|
||||||
declar.o: debugcst.h
|
declar.o: debugcst.h
|
||||||
declar.o: def.h
|
declar.o: def.h
|
||||||
|
@ -535,6 +555,7 @@ expression.o: Lpars.h
|
||||||
expression.o: bigparam.h
|
expression.o: bigparam.h
|
||||||
expression.o: chk_expr.h
|
expression.o: chk_expr.h
|
||||||
expression.o: const.h
|
expression.o: const.h
|
||||||
|
expression.o: dbsymtab.h
|
||||||
expression.o: debug.h
|
expression.o: debug.h
|
||||||
expression.o: debugcst.h
|
expression.o: debugcst.h
|
||||||
expression.o: def.h
|
expression.o: def.h
|
||||||
|
@ -548,6 +569,7 @@ expression.o: warning.h
|
||||||
statement.o: LLlex.h
|
statement.o: LLlex.h
|
||||||
statement.o: Lpars.h
|
statement.o: Lpars.h
|
||||||
statement.o: bigparam.h
|
statement.o: bigparam.h
|
||||||
|
statement.o: dbsymtab.h
|
||||||
statement.o: def.h
|
statement.o: def.h
|
||||||
statement.o: idf.h
|
statement.o: idf.h
|
||||||
statement.o: nocross.h
|
statement.o: nocross.h
|
||||||
|
@ -563,6 +585,7 @@ casestat.o: LLlex.h
|
||||||
casestat.o: Lpars.h
|
casestat.o: Lpars.h
|
||||||
casestat.o: bigparam.h
|
casestat.o: bigparam.h
|
||||||
casestat.o: chk_expr.h
|
casestat.o: chk_expr.h
|
||||||
|
casestat.o: dbsymtab.h
|
||||||
casestat.o: debug.h
|
casestat.o: debug.h
|
||||||
casestat.o: debugcst.h
|
casestat.o: debugcst.h
|
||||||
casestat.o: def.h
|
casestat.o: def.h
|
||||||
|
@ -577,6 +600,7 @@ casestat.o: type.h
|
||||||
casestat.o: walk.h
|
casestat.o: walk.h
|
||||||
tmpvar.o: LLlex.h
|
tmpvar.o: LLlex.h
|
||||||
tmpvar.o: bigparam.h
|
tmpvar.o: bigparam.h
|
||||||
|
tmpvar.o: dbsymtab.h
|
||||||
tmpvar.o: debug.h
|
tmpvar.o: debug.h
|
||||||
tmpvar.o: debugcst.h
|
tmpvar.o: debugcst.h
|
||||||
tmpvar.o: def.h
|
tmpvar.o: def.h
|
||||||
|
@ -588,6 +612,7 @@ tmpvar.o: target_sizes.h
|
||||||
tmpvar.o: type.h
|
tmpvar.o: type.h
|
||||||
scope.o: LLlex.h
|
scope.o: LLlex.h
|
||||||
scope.o: bigparam.h
|
scope.o: bigparam.h
|
||||||
|
scope.o: dbsymtab.h
|
||||||
scope.o: debug.h
|
scope.o: debug.h
|
||||||
scope.o: debugcst.h
|
scope.o: debugcst.h
|
||||||
scope.o: def.h
|
scope.o: def.h
|
||||||
|
|
|
@ -90,4 +90,7 @@
|
||||||
returns a pointer to it
|
returns a pointer to it
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
!File: dbsymtab.h
|
||||||
|
#undef DBSYMTAB 1 /* ability to produce symbol table for debugger */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "strict3rd.h"
|
#include "strict3rd.h"
|
||||||
|
#include "dbsymtab.h"
|
||||||
#include "idf.h"
|
#include "idf.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
|
@ -112,11 +113,18 @@ declaration
|
||||||
|
|
|
|
||||||
{ ++proclevel; }
|
{ ++proclevel; }
|
||||||
ProcedureHeading(&df, D_PROCEDURE)
|
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))
|
block(&(df->prc_body))
|
||||||
IDENT
|
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);
|
EndProc(df, dot.TOK_IDF);
|
||||||
--proclevel;
|
--proclevel;
|
||||||
}
|
}
|
||||||
|
@ -180,7 +188,9 @@ TypeDeclaration
|
||||||
'=' type(&tp)
|
'=' type(&tp)
|
||||||
{ DeclareType(nd, df, tp);
|
{ DeclareType(nd, df, tp);
|
||||||
FreeNode(nd);
|
FreeNode(nd);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) stb_string(df, D_TYPE);
|
if (options['g']) stb_string(df, D_TYPE);
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -534,7 +544,9 @@ ConstantDeclaration
|
||||||
df->con_const = nd->nd_token;
|
df->con_const = nd->nd_token;
|
||||||
df->df_type = nd->nd_type;
|
df->df_type = nd->nd_type;
|
||||||
FreeNode(nd);
|
FreeNode(nd);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) stb_string(df, D_CONST);
|
if (options['g']) stb_string(df, D_CONST);
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <em_code.h>
|
#include <em_code.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "dbsymtab.h"
|
||||||
#include "idf.h"
|
#include "idf.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
|
@ -41,7 +42,9 @@ Enter(name, kind, type, pnam)
|
||||||
df = define(str2idf(name, 0), CurrentScope, kind);
|
df = define(str2idf(name, 0), CurrentScope, kind);
|
||||||
df->df_type = type;
|
df->df_type = type;
|
||||||
if (pnam) df->df_value.df_stdname = pnam;
|
if (pnam) df->df_value.df_stdname = pnam;
|
||||||
|
#ifdef DBSYMTAB
|
||||||
else if (options['g']) stb_string(df, kind);
|
else if (options['g']) stb_string(df, kind);
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
return df;
|
return df;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +183,9 @@ EnterVarList(Idlist, type, local)
|
||||||
C_ina_dnam(df->var_name);
|
C_ina_dnam(df->var_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) stb_string(df, D_VARIABLE);
|
if (options['g']) stb_string(df, D_VARIABLE);
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
}
|
}
|
||||||
FreeNode(Idlist);
|
FreeNode(Idlist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <stb.h>
|
#include <stb.h>
|
||||||
|
|
||||||
#include "strict3rd.h"
|
#include "strict3rd.h"
|
||||||
|
#include "dbsymtab.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "f_info.h"
|
#include "f_info.h"
|
||||||
#include "idf.h"
|
#include "idf.h"
|
||||||
|
@ -87,9 +88,11 @@ Compile(src, dst)
|
||||||
if (! C_open(dst)) fatal("could not open output file");
|
if (! C_open(dst)) fatal("could not open output file");
|
||||||
C_magic();
|
C_magic();
|
||||||
C_ms_emx(word_size, pointer_size);
|
C_ms_emx(word_size, pointer_size);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) {
|
if (options['g']) {
|
||||||
C_ms_std(FileName, N_SO, 0);
|
C_ms_std(FileName, N_SO, 0);
|
||||||
}
|
}
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
init_idf();
|
init_idf();
|
||||||
InitCst();
|
InitCst();
|
||||||
reserve(tkidf);
|
reserve(tkidf);
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
|
|
||||||
#include "strict3rd.h"
|
#include "strict3rd.h"
|
||||||
|
#include "dbsymtab.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "warning.h"
|
#include "warning.h"
|
||||||
|
@ -60,10 +61,12 @@ DoOption(text)
|
||||||
options[text[-1]]++;
|
options[text[-1]]++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef DBSYMTAB
|
||||||
case 'g': /* generate symbol table for debugger */
|
case 'g': /* generate symbol table for debugger */
|
||||||
options['g']++;
|
options['g']++;
|
||||||
options['n']++; /* no register vars ??? */
|
options['n']++; /* no register vars ??? */
|
||||||
break;
|
break;
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
|
|
||||||
case 'w':
|
case 'w':
|
||||||
if (*text) {
|
if (*text) {
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <stb.h>
|
#include <stb.h>
|
||||||
|
|
||||||
#include "strict3rd.h"
|
#include "strict3rd.h"
|
||||||
|
#include "dbsymtab.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "idf.h"
|
#include "idf.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
|
@ -63,10 +64,16 @@ ModuleDeclaration
|
||||||
';'
|
';'
|
||||||
import(1)*
|
import(1)*
|
||||||
export(&qualified, &exportlist)
|
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))
|
block(&(df->mod_body))
|
||||||
IDENT { EnterExportList(exportlist, qualified);
|
IDENT { EnterExportList(exportlist, qualified);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) stb_string(df, D_END);
|
if (options['g']) stb_string(df, D_END);
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
close_scope(SC_CHKFORW|SC_CHKPROC|SC_REVERSE);
|
close_scope(SC_CHKFORW|SC_CHKPROC|SC_REVERSE);
|
||||||
match_id(df->df_idf, dot.TOK_IDF);
|
match_id(df->df_idf, dot.TOK_IDF);
|
||||||
}
|
}
|
||||||
|
@ -159,7 +166,9 @@ DefinitionModule
|
||||||
DefinitionModule++;
|
DefinitionModule++;
|
||||||
if (!Defined) {
|
if (!Defined) {
|
||||||
Defined = df;
|
Defined = df;
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) stb_string(df, D_MODULE);
|
if (options['g']) stb_string(df, D_MODULE);
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
';'
|
';'
|
||||||
|
@ -211,7 +220,11 @@ definition
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
';'
|
';'
|
||||||
{ if (options['g']) stb_string(df, D_TYPE); }
|
{
|
||||||
|
#ifdef DBSYMTAB
|
||||||
|
if (options['g']) stb_string(df, D_TYPE);
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
|
}
|
||||||
]*
|
]*
|
||||||
|
|
|
|
||||||
VAR [ %persistent VariableDeclaration ';' ]*
|
VAR [ %persistent VariableDeclaration ';' ]*
|
||||||
|
@ -234,13 +247,17 @@ ProgramModule
|
||||||
df->mod_vis = CurrVis;
|
df->mod_vis = CurrVis;
|
||||||
CurrentScope->sc_name = "__M2M_";
|
CurrentScope->sc_name = "__M2M_";
|
||||||
CurrentScope->sc_definedby = df;
|
CurrentScope->sc_definedby = df;
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) stb_string(df, D_MODULE);
|
if (options['g']) stb_string(df, D_MODULE);
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
priority(&(df->mod_priority))
|
priority(&(df->mod_priority))
|
||||||
';' import(0)*
|
';' import(0)*
|
||||||
block(&(df->mod_body)) IDENT
|
block(&(df->mod_body)) IDENT
|
||||||
{ if (options['g']) {
|
{
|
||||||
|
#ifdef DBSYMTAB
|
||||||
|
if (options['g']) {
|
||||||
if (state == PROGRAM) {
|
if (state == PROGRAM) {
|
||||||
C_ms_stb_cst(df->df_idf->id_text,
|
C_ms_stb_cst(df->df_idf->id_text,
|
||||||
N_MAIN,
|
N_MAIN,
|
||||||
|
@ -249,6 +266,7 @@ ProgramModule
|
||||||
}
|
}
|
||||||
stb_string(df, D_END);
|
stb_string(df, D_END);
|
||||||
}
|
}
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
close_scope(SC_CHKFORW|SC_CHKPROC|SC_REVERSE);
|
close_scope(SC_CHKFORW|SC_CHKPROC|SC_REVERSE);
|
||||||
match_id(df->df_idf, dot.TOK_IDF);
|
match_id(df->df_idf, dot.TOK_IDF);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
|
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
|
|
||||||
|
#include "dbsymtab.h"
|
||||||
|
|
||||||
|
#ifdef DBSYMTAB
|
||||||
|
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
#include <em_arith.h>
|
#include <em_arith.h>
|
||||||
#include <em_label.h>
|
#include <em_label.h>
|
||||||
|
@ -391,3 +395,4 @@ stb_string(df, kind)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
|
|
||||||
|
#include "dbsymtab.h"
|
||||||
|
|
||||||
struct paramlist { /* structure for parameterlist of a PROCEDURE */
|
struct paramlist { /* structure for parameterlist of a PROCEDURE */
|
||||||
struct paramlist *par_next;
|
struct paramlist *par_next;
|
||||||
struct def *par_def; /* "df" of parameter */
|
struct def *par_def; /* "df" of parameter */
|
||||||
|
@ -102,7 +104,9 @@ struct type {
|
||||||
#define T_INDEX (T_ENUMERATION|T_CHAR|T_SUBRANGE)
|
#define T_INDEX (T_ENUMERATION|T_CHAR|T_SUBRANGE)
|
||||||
#define T_DISCRETE (T_INDEX|T_INTORCARD)
|
#define T_DISCRETE (T_INDEX|T_INTORCARD)
|
||||||
#define T_CONSTRUCTED (T_ARRAY|T_SET|T_RECORD)
|
#define T_CONSTRUCTED (T_ARRAY|T_SET|T_RECORD)
|
||||||
|
#ifdef DBSYMTAB
|
||||||
short tp_dbindex; /* index in debugger symbol table */
|
short tp_dbindex; /* index in debugger symbol table */
|
||||||
|
#endif
|
||||||
int tp_align; /* alignment requirement of this type */
|
int tp_align; /* alignment requirement of this type */
|
||||||
arith tp_size; /* size of this type */
|
arith tp_size; /* size of this type */
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <stb.h>
|
#include <stb.h>
|
||||||
|
|
||||||
#include "strict3rd.h"
|
#include "strict3rd.h"
|
||||||
|
#include "dbsymtab.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
|
@ -127,6 +128,7 @@ DoLineno(nd)
|
||||||
nd->nd_lineno != oldlineno) {
|
nd->nd_lineno != oldlineno) {
|
||||||
oldlineno = nd->nd_lineno;
|
oldlineno = nd->nd_lineno;
|
||||||
if (! options['L']) C_lin((arith) nd->nd_lineno);
|
if (! options['L']) C_lin((arith) nd->nd_lineno);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if ( options['g']) {
|
if ( options['g']) {
|
||||||
static int ms_lineno;
|
static int ms_lineno;
|
||||||
|
|
||||||
|
@ -135,6 +137,7 @@ DoLineno(nd)
|
||||||
ms_lineno = nd->nd_lineno;
|
ms_lineno = nd->nd_lineno;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,17 +224,21 @@ WalkModule(module)
|
||||||
}
|
}
|
||||||
WalkDefList(sc->sc_def, MkCalls);
|
WalkDefList(sc->sc_def, MkCalls);
|
||||||
proclevel++;
|
proclevel++;
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) {
|
if (options['g']) {
|
||||||
C_ms_std((char *) 0, N_LBRAC, proclevel);
|
C_ms_std((char *) 0, N_LBRAC, proclevel);
|
||||||
}
|
}
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
WalkNode(module->mod_body, NO_EXIT_LABEL, REACH_FLAG);
|
WalkNode(module->mod_body, NO_EXIT_LABEL, REACH_FLAG);
|
||||||
DO_DEBUG(options['X'], PrNode(module->mod_body, 0));
|
DO_DEBUG(options['X'], PrNode(module->mod_body, 0));
|
||||||
def_ilb(RETURN_LABEL);
|
def_ilb(RETURN_LABEL);
|
||||||
EndPriority();
|
EndPriority();
|
||||||
C_ret((arith) 0);
|
C_ret((arith) 0);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) {
|
if (options['g']) {
|
||||||
C_ms_std((char *) 0, N_RBRAC, proclevel);
|
C_ms_std((char *) 0, N_RBRAC, proclevel);
|
||||||
}
|
}
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
C_end(-sc->sc_off);
|
C_end(-sc->sc_off);
|
||||||
proclevel--;
|
proclevel--;
|
||||||
TmpClose();
|
TmpClose();
|
||||||
|
@ -449,9 +456,11 @@ WalkProcedure(procedure)
|
||||||
C_ret(func_res_size);
|
C_ret(func_res_size);
|
||||||
C_beginpart(partno2);
|
C_beginpart(partno2);
|
||||||
C_pro(procscope->sc_name, -procscope->sc_off);
|
C_pro(procscope->sc_name, -procscope->sc_off);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) {
|
if (options['g']) {
|
||||||
C_ms_std((char *) 0, N_LBRAC, proclevel);
|
C_ms_std((char *) 0, N_LBRAC, proclevel);
|
||||||
}
|
}
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
C_ms_par(procedure->df_type->prc_nbpar
|
C_ms_par(procedure->df_type->prc_nbpar
|
||||||
#ifdef BIG_RESULT_ON_STACK
|
#ifdef BIG_RESULT_ON_STACK
|
||||||
+ (too_big ? func_res_size : 0)
|
+ (too_big ? func_res_size : 0)
|
||||||
|
@ -459,9 +468,11 @@ WalkProcedure(procedure)
|
||||||
);
|
);
|
||||||
if (! options['n']) WalkDefList(procscope->sc_def, RegisterMessage);
|
if (! options['n']) WalkDefList(procscope->sc_def, RegisterMessage);
|
||||||
C_endpart(partno2);
|
C_endpart(partno2);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) {
|
if (options['g']) {
|
||||||
C_ms_std((char *) 0, N_RBRAC, proclevel);
|
C_ms_std((char *) 0, N_RBRAC, proclevel);
|
||||||
}
|
}
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
C_end(-procscope->sc_off);
|
C_end(-procscope->sc_off);
|
||||||
if (! fit(procscope->sc_off, (int) word_size)) {
|
if (! fit(procscope->sc_off, (int) word_size)) {
|
||||||
node_error(procedure->prc_body,
|
node_error(procedure->prc_body,
|
||||||
|
|
Loading…
Add table
Reference in a new issue