acid: fix acid/network, fix address formats from X to A

This commit is contained in:
cinap_lenrek 2014-02-12 20:04:07 +01:00
parent cd17077749
commit b7b68668cf
2 changed files with 17 additions and 22 deletions

View file

@ -9,7 +9,7 @@ _ni() {
defn
ipdev(n) {
_ipfs(*(ipfs+4*n));
_ipfs(ipfs[n]);
}
// the funny _foo/foo pairs exist so that if we get
@ -21,11 +21,11 @@ _ipfs(fs) {
complex Fs fs;
local i;
print("ipfs(", fs\X, ") #I", fs.dev\D, "\n");
print("ipfs(", fs\A, ") #I", fs.dev\D, "\n");
i=0;
_ni = _ni+1;
while i < fs.np do {
_proto(*(fs.p+i*4));
_proto(fs.p[i]);
i = i + 1;
}
_ni = _ni-1;
@ -42,15 +42,15 @@ _proto(p) {
local c;
complex Proto p;
_ni();
print("proto(", p\X, ") ", *(p.name\s), "\n");
print("proto(", p\A, ") ", *(p.name\s), "\n");
_ni = _ni+1;
local i;
i = 0;
while i < p.nc do {
c = *(p.conv+i*4);
c = p.conv[i];
complex Conv c;
if c != 0 && c.inuse then
_conv(*(p.conv+i*4));
_conv(c);
i = i + 1;
}
_ni = _ni - 1;
@ -69,7 +69,7 @@ _conv(c) {
local p;
p = c.p;
complex Proto p;
print("conv(", c\X, ") ", *(p.name\s), "/", c.x\D, " ",
print("conv(", c\A, ") ", *(p.name\s), "/", c.x\D, " ",
iptostr(*(c.laddr+12)), "!", c.lport\D, " ", iptostr(*(c.raddr+12)),
"!", c.rport\D, " rq ", qtostr(c.rq), " wq ", qtostr(c.wq),
" eq ", qtostr(c.eq), "\n");
@ -93,7 +93,7 @@ qtostr(q)
{
complex Queue q;
return "queue("+itoa(q, "%lux")+") ["+itoa(q.len, "%d")+","+itoa(q.dlen, "%d")+","+itoa(qblocks(q), "%d")+"]";
return "queue("+itoa(q, "%ux")+") ["+itoa(q.len, "%d")+","+itoa(q.dlen, "%d")+","+itoa(qblocks(q), "%d")+"]";
}
defn
@ -118,7 +118,7 @@ _queue(q)
complex Queue q;
local b;
print("queue(", q\X, ") len ", q.len\D, " dlen ", q.dlen\D, " limit ", q.limit\D, " nblocks ", qblocks(q)\D);
print("queue(", q\A, ") len ", q.len\D, " dlen ", q.dlen\D, " limit ", q.limit\D, " nblocks ", qblocks(q)\D);
if q.state & Qstarve then
print(" starve");
if q.state & Qmsg then
@ -154,7 +154,7 @@ _block(b)
complex Block b;
_ni();
print("block(", b\X, ") base ", b.base\X, " rp ", b.rp\X, "/", b.rp-b.base\D, " wp ", b.wp\X, "/", b.wp-b.base\D, " lim ", b.lim\X, "/", b.lim-b.base\D, "\n");
print("block(", b\A, ") base ", b.base, " rp ", b.rp, "/", b.rp-b.base\D, " wp ", b.wp, "/", b.wp-b.base\D, " lim ", b.lim, "/", b.lim-b.base\D, "\n");
}
defn

View file

@ -11,8 +11,8 @@ notestk(addr)
local pc, sp;
complex Ureg addr;
pc = addr.pc\X;
sp = addr.sp\X;
pc = addr.pc\A;
sp = addr.sp\A;
print("Note pc:", pc, " sp:", sp, " ", fmt(pc, 'a'), " ");
pfl(pc);
@ -25,19 +25,14 @@ notelstk(addr)
local pc, sp;
complex Ureg addr;
pc = addr.pc\X;
sp = addr.sp\X;
pc = addr.pc\A;
sp = addr.sp\A;
print("Note pc:", pc, " sp:", sp, " ", fmt(pc, 'a'), " ");
pfl(pc);
_stk(pc, sp, linkreg(addr), 1);
}
defn labstk(l) // trace from a label
{
_stk(*(l+4), *l, linkreg(0), 0);
}
defn params(param)
{
while param do {
@ -313,7 +308,7 @@ defn bptab() // print a table of breakpoints
lst = bplist;
while lst do {
addr = head lst;
print("\t", fmt(addr, 'X'), " ", fmt(addr, 'a'), " ", fmt(addr, 'i'), "\n");
print("\t", fmt(addr, 'A'), " ", fmt(addr, 'a'), " ", fmt(addr, 'i'), "\n");
lst = tail lst;
}
}
@ -390,7 +385,7 @@ defn asm(addr)
addr = fmt(addr, 'i');
loop 1,_asmlines do {
print(fmt(addr, 'a'), " ", fmt(addr, 'X'));
print(fmt(addr, 'a'), " ", fmt(addr, 'A'));
print("\t", @addr++, "\n");
if bound != {} && addr > bound[1] then {
lasmaddr = addr;
@ -510,7 +505,7 @@ defn dump(addr, n, fmt)
{
// see definition of dump in acid manual: it does n+1 iterations
loop 0, n do {
print(fmt(addr, 'X'), ": ");
print(fmt(addr, 'A'), ": ");
addr = mem(addr, fmt);
}
}