aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acid/acid.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-23 22:48:19 +0000
committerrsc <devnull@localhost>2005-01-23 22:48:19 +0000
commit4f2ac1b76b04df503944e86c2e7f152c2ff53f0e (patch)
treed90d1387f48337337bd0798f29d6881f67899f80 /src/cmd/acid/acid.h
parenta5f9ff62b2d70a5b75efe8e4f993aec10f209095 (diff)
downloadplan9port-4f2ac1b76b04df503944e86c2e7f152c2ff53f0e.tar.gz
plan9port-4f2ac1b76b04df503944e86c2e7f152c2ff53f0e.tar.bz2
plan9port-4f2ac1b76b04df503944e86c2e7f152c2ff53f0e.zip
Working on better handling of multithreading in general
and core dumps in particular. See notes: new types: register is something that when dereferenced gives you the registers. the Ureg is no longer mapped at 0. refconst is something that gives a constant when dereferenced. new builtin register("AX") creates register values new builtin refconst(0x123) creates refconst values new builtin var("foo") is equivalent to the variable foo (it returns foo but can also be used as the lhs of an assignment). new acid function getregs() returns a list of the current values of registers. new acid function setregs() sets the current registers to those values. note that getregs and setregs operate on register locations, not the register values themselves. new acid function resetregs() sets registers to register("AX"), etc. new acid function clearregs() sets all registers to constant -1. the default register settings are as in resetregs(), not small numbers. new acid variables coretext, pids, systype, corefile, cmdline. new behavior: local variable lookup, stk, etc., use the acid values of registers (*PC, *SP, and so on), so the thread support code can change the context completely. unary + is applicable to more data types and prints more often.
Diffstat (limited to 'src/cmd/acid/acid.h')
-rw-r--r--src/cmd/acid/acid.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cmd/acid/acid.h b/src/cmd/acid/acid.h
index 44718009..866816e8 100644
--- a/src/cmd/acid/acid.h
+++ b/src/cmd/acid/acid.h
@@ -44,6 +44,7 @@ Extern int interactive;
Extern Node* code;
Extern int na;
Extern int wtflag;
+Extern Regs* acidregs;
Extern Regs* correg;
Extern Map* cormap;
Extern Map* symmap;
@@ -76,6 +77,8 @@ enum
TSTRING,
TLIST,
TCODE,
+ TREG,
+ TCON,
NUMT,
};
@@ -129,6 +132,8 @@ struct Store
String* string;
List* l;
Node* cc;
+ char* reg;
+ Node* con;
} u;
};
@@ -182,6 +187,7 @@ struct String
int len;
};
+int acidregsrw(Regs*, char*, ulong*, int);
List* addlist(List*, List*);
void addvarsym(Fhdr*);
List* al(int);
@@ -212,6 +218,7 @@ void gc(void);
char* getstatus(int);
void* gmalloc(long);
void indir(Map*, ulong, char, Node*);
+void indirreg(Regs*, char*, char, Node*);
void initexpr(void);
void initprint(void);
void installbuiltin(void);
@@ -257,7 +264,8 @@ void userinit(void);
void varreg(void);
void varsym(void);
void whatis(Lsym*);
-void windir(Map*, Node*, Node*, Node*);
+void windir(Map*, Node, Node*, Node*);
+void windirreg(Regs*, char*, Node*, Node*);
void yyerror(char*, ...);
int yylex(void);
int yyparse(void);
@@ -313,5 +321,6 @@ enum
OFMT,
OEVAL,
OWHAT,
+ OUPLUS,
NUMO,
};