diff options
author | Russ Cox <rsc@swtch.com> | 2012-02-19 18:11:39 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2012-02-19 18:11:39 -0500 |
commit | 443d6288386f5521efa7d49bc8ea5be04f5fd696 (patch) | |
tree | 443a41a36f0bb96502fe218c4423a9e5571d7e17 /src/cmd | |
parent | 60d96f2e4385f0b4cee12add6dea545880a0e6a1 (diff) | |
download | plan9port-443d6288386f5521efa7d49bc8ea5be04f5fd696.tar.gz plan9port-443d6288386f5521efa7d49bc8ea5be04f5fd696.tar.bz2 plan9port-443d6288386f5521efa7d49bc8ea5be04f5fd696.zip |
libmach, acid, db: 64-bit support
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/acid/acid.h | 4 | ||||
-rw-r--r-- | src/cmd/acid/builtin.c | 8 | ||||
-rw-r--r-- | src/cmd/acid/exec.c | 2 | ||||
-rw-r--r-- | src/cmd/acid/expr.c | 6 | ||||
-rw-r--r-- | src/cmd/acid/list.c | 4 | ||||
-rw-r--r-- | src/cmd/acid/main.c | 5 | ||||
-rw-r--r-- | src/cmd/db/defs.h | 2 | ||||
-rw-r--r-- | src/cmd/db/expr.c | 4 | ||||
-rw-r--r-- | src/cmd/db/print.c | 7 | ||||
-rw-r--r-- | src/cmd/db/regs.c | 2 | ||||
-rw-r--r-- | src/cmd/db/trcrun.c | 2 |
11 files changed, 25 insertions, 21 deletions
diff --git a/src/cmd/acid/acid.h b/src/cmd/acid/acid.h index e58e9b13..d83d7c09 100644 --- a/src/cmd/acid/acid.h +++ b/src/cmd/acid/acid.h @@ -192,7 +192,7 @@ struct String int len; }; -int acidregsrw(Regs*, char*, ulong*, int); +int acidregsrw(Regs*, char*, u64int*, int); List* addlist(List*, List*); void addvarsym(Fhdr*); List* al(int); @@ -263,7 +263,7 @@ String* strnode(char*); String* strnodlen(char*, int); #define system acidsystem char* system(void); -int trlist(Map*, Regs*, ulong, ulong, Symbol*, int); +int trlist(Map*, Regs*, u64int, u64int, Symbol*, int); void unwind(void); void userinit(void); void varreg(void); diff --git a/src/cmd/acid/builtin.c b/src/cmd/acid/builtin.c index d6601d0e..1b09a4ef 100644 --- a/src/cmd/acid/builtin.c +++ b/src/cmd/acid/builtin.c @@ -453,7 +453,7 @@ follow(Node *r, Node *args) { int n, i; Node res; - ulong f[10]; + u64int f[10]; List **tail, *l; if(args == 0) @@ -480,7 +480,7 @@ funcbound(Node *r, Node *args) { int n; Node res; - ulong bounds[2]; + u64int bounds[2]; List *l; if(args == 0) @@ -523,7 +523,7 @@ filepc(Node *r, Node *args) int i; Node res; char *p, c; - ulong v; + u64int v; if(args == 0) error("filepc(filename:line): arg count"); @@ -1035,7 +1035,7 @@ static struct static int nsregs; static int -straceregrw(Regs *regs, char *name, ulong *val, int isr) +straceregrw(Regs *regs, char *name, u64int *val, int isr) { int i; diff --git a/src/cmd/acid/exec.c b/src/cmd/acid/exec.c index a8319b64..b173ef3b 100644 --- a/src/cmd/acid/exec.c +++ b/src/cmd/acid/exec.c @@ -354,7 +354,7 @@ indir(Map *m, ulong addr, char fmt, Node *r) void indirreg(Regs *regs, char *name, char fmt, Node *r) { - ulong val; + u64int val; if(regs == 0) error("no register set for *%s=", name); diff --git a/src/cmd/acid/expr.c b/src/cmd/acid/expr.c index 61d5951e..5d81ac58 100644 --- a/src/cmd/acid/expr.c +++ b/src/cmd/acid/expr.c @@ -168,7 +168,7 @@ oframe(Node *n, Node *res) { char *p; Node *lp; - ulong ival; + u64int ival; Frtype *f; p = n->sym->name; @@ -1070,12 +1070,12 @@ initexpr(void) } int -acidregsrw(Regs *r, char *name, ulong *u, int isr) +acidregsrw(Regs *r, char *name, u64int *u, int isr) { Lsym *l; Value *v; Node *n; - ulong addr; + u64int addr; u32int u32; if(!isr){ diff --git a/src/cmd/acid/list.c b/src/cmd/acid/list.c index b75d0d70..2c26426e 100644 --- a/src/cmd/acid/list.c +++ b/src/cmd/acid/list.c @@ -196,7 +196,7 @@ listregisters(Map *map, Regs *regs) { List **tail, *l2, *l; Regdesc *rp; - ulong v; + u64int v; l2 = 0; tail = &l2; @@ -255,7 +255,7 @@ listautos(Map *map, Regs *regs, Symbol *fn) } int -trlist(Map *map, Regs *regs, ulong pc, ulong callerpc, Symbol *sym, int depth) +trlist(Map *map, Regs *regs, u64int pc, u64int callerpc, Symbol *sym, int depth) { List *q, *l; static List **tail; diff --git a/src/cmd/acid/main.c b/src/cmd/acid/main.c index 9c9c0262..b63bfe2b 100644 --- a/src/cmd/acid/main.c +++ b/src/cmd/acid/main.c @@ -92,6 +92,8 @@ main(int argc, char *argv[]) default: usage(); }ARGEND + + USED(pid); fmtinstall('Z', Zfmt); fmtinstall('L', locfmt); @@ -195,7 +197,8 @@ attachfiles(int argc, char **argv) pid = 0; interactive = 0; - + USED(pid); + if(setjmp(err)) return -1; diff --git a/src/cmd/db/defs.h b/src/cmd/db/defs.h index 63fde3ba..7929cc63 100644 --- a/src/cmd/db/defs.h +++ b/src/cmd/db/defs.h @@ -11,7 +11,7 @@ #include <mach.h> typedef long WORD; -typedef ulong ADDR; +typedef u64int ADDR; #define HUGEINT 0x7fffffff /* enormous WORD */ diff --git a/src/cmd/db/expr.c b/src/cmd/db/expr.c index 8d33e7f4..74c9319a 100644 --- a/src/cmd/db/expr.c +++ b/src/cmd/db/expr.c @@ -166,7 +166,7 @@ item(int a) { /* name [ . local ] | number | . | ^ | <register | 'x | | */ char *base; char savc; - ulong u; + u64int u; Symbol s; char gsym[MAXSYM], lsym[MAXSYM]; @@ -388,7 +388,7 @@ dbround(long a, long b) ulong dbrget(Map *map, char *name) { - ulong u; + u64int u; USED(map); if(rget(correg, name, &u) < 0) diff --git a/src/cmd/db/print.c b/src/cmd/db/print.c index 05096a76..3f1a5805 100644 --- a/src/cmd/db/print.c +++ b/src/cmd/db/print.c @@ -22,7 +22,7 @@ static void printfp(Map*, int); * callback on stack trace */ static int -ptrace(Map *map, Regs *regs, ulong pc, ulong nextpc, Symbol *sym, int depth) +ptrace(Map *map, Regs *regs, u64int pc, u64int nextpc, Symbol *sym, int depth) { char buf[512]; @@ -48,7 +48,7 @@ ptrace(Map *map, Regs *regs, ulong pc, ulong nextpc, Symbol *sym, int depth) static ulong *adrregvals; static int -adrrw(Regs *regs, char *name, ulong *val, int isr) +adrrw(Regs *regs, char *name, u64int *val, int isr) { int i; @@ -215,6 +215,7 @@ printdollar(int modif) default: error("bad `$' command"); } + USED(r); } @@ -359,7 +360,7 @@ void printpc(void) { char buf[512]; - ulong u; + u64int u; if(rget(correg, mach->pc, &u) < 0) error("%r"); diff --git a/src/cmd/db/regs.c b/src/cmd/db/regs.c index 4a9a4426..370fb997 100644 --- a/src/cmd/db/regs.c +++ b/src/cmd/db/regs.c @@ -13,7 +13,7 @@ printregs(int c) { Regdesc *rp; int i; - ulong u; + ADDR u; if(correg == nil){ dprint("registers not mapped\n"); diff --git a/src/cmd/db/trcrun.c b/src/cmd/db/trcrun.c index 807f902e..0168bcf4 100644 --- a/src/cmd/db/trcrun.c +++ b/src/cmd/db/trcrun.c @@ -208,7 +208,7 @@ void runstep(ulong loc, int keepnote) { int nfoll; - ulong foll[3]; + ADDR foll[3]; BKPT bkpt[3]; int i; |