2
* Copyright (c) 1992, 2002 Michael J. Roberts. All Rights Reserved.
4
* Please see the accompanying license file, LICENSE.TXT, for information
5
* on using and copying this software.
9
dbgtr.c - Debugging functions for run-time
11
Provides dummy entrypoints for various debugger functions for run-time.
13
Eliminates a number of time- and space-consuming functions from TR.
14
Also defines a couple of TOKTH entrypoints since there will be no
15
need for a symbol table when debugging is not enabled.
17
12/18/92 MJRoberts - creation
27
/* indicate that the debugger is not present */
33
static void dummy_add(toktdef *tab, char *nam, int namel, int typ,
35
static int dummy_sea(toktdef *tab, char *nam, int namel, int hash,
36
toksdef *ret) { return(0); }
37
static void dummy_set(toktdef *tab, toksdef *sym) {}
38
static void dummy_each(toktdef *tab, void (*fn)(void *, toksdef *),
40
uint tokhsh(char *nam) { return(0); }
42
/* dummy symbol table entrypoints */
43
void tokthini(errcxdef *ec, mcmcxdef *mctx, toktdef *symtab1)
45
tokthdef *symtab = (tokthdef *)symtab1; /* convert to correct type */
48
symtab1->toktfadd = dummy_add;
49
symtab1->toktfsea = dummy_sea;
50
symtab1->toktfset = dummy_set;
51
symtab1->toktfeach = dummy_each;
52
symtab1->tokterr = ec;
53
symtab->tokthmem = mctx;
56
/* dummy debugger entrypoints */
57
void dbgent(dbgcxdef *ctx, struct runsdef *bp, objnum self, objnum target,
58
prpnum prop, int binum, int argc)
62
void dbglv(dbgcxdef *ctx, int exittype)
66
int dbgnam(dbgcxdef *ctx, char *outbuf, int typ, int val)
68
memcpy(outbuf, "<NO SYMBOL TABLE>", (size_t)17);
72
void dbgds(dbgcxdef *ctx)
77
int dbgu_err_resume(dbgcxdef *ctx)
83
void dbguquitting(dbgcxdef *ctx)