commit - 77fd60a177e50b398f1f235bcc47cbfc92e0fa80
commit + 689be541258e9e701a600d6bd2fc3e5241726867
blob - 195834d3894b921ca4d0fc0a3e3a191bf5cf741a
blob + d6601d0e737320149290185da471b55f74841d86
--- src/cmd/acid/builtin.c
+++ src/cmd/acid/builtin.c
void status(Node*, Node*);
void xkill(Node*,Node*);
void waitstop(Node*, Node*);
-void sysstop(Node*, Node*);
+void waitsyscall(Node*, Node*);
void stop(Node*, Node*);
void start(Node*, Node*);
void filepc(Node*, Node*);
void xregister(Node*, Node*);
void refconst(Node*, Node*);
void dolook(Node*, Node*);
+void step1(Node*, Node*);
typedef struct Btab Btab;
struct Btab
"start", start,
"startstop", startstop,
"status", status,
+ "step1", step1,
"stop", stop,
"strace", strace,
"stringn", stringn,
- "sysstop", sysstop,
"textfile", textfile,
"var", dolook,
"waitstop", waitstop,
+ "waitsyscall", waitsyscall,
0
};
}
void
+step1(Node *r, Node *args)
+{
+ Node res;
+
+ USED(r);
+ if(args == 0)
+ error("step1(pid): no pid");
+ expr(args, &res);
+ if(res.type != TINT)
+ error("step1(pid): arg type");
+
+ msg(res.store.u.ival, "step");
+ notes(res.store.u.ival);
+ dostop(res.store.u.ival);
+}
+
+void
startstop(Node *r, Node *args)
{
Node res;
}
void
-sysstop(Node *r, Node *args)
+waitsyscall(Node *r, Node *args)
{
Node res;
USED(r);
if(args == 0)
- error("waitstop(pid): no pid");
+ error("waitsyscall(pid): no pid");
expr(args, &res);
if(res.type != TINT)
- error("waitstop(pid): arg type");
+ error("waitsycall(pid): arg type");
Bflush(bout);
msg(res.store.u.ival, "sysstop");
error("fnbound(addr): arg type");
n = fnbound(res.store.u.ival, bounds);
- if (n != 0) {
+ if (n >= 0) {
r->store.u.l = al(TINT);
l = r->store.u.l;
l->store.u.ival = bounds[0];
blob - 0ae5a5bb2d14eb1bf23e87d1bc4f6dc7a54922f9
blob + 298e4351305b5b087c4bacd84bba40bc0a9473ab
--- src/cmd/acid/proc.c
+++ src/cmd/acid/proc.c
fatal("new: exec %s: %r");
default:
install(pid);
+ msg(pid, "attached");
msg(pid, "waitstop");
notes(pid);
sproc(pid);
char *
getstatus(int pid)
{
- int fd;
- char *p;
-
- static char buf[128];
-
- sprint(buf, "/proc/%d/status", pid);
- fd = open(buf, OREAD);
- if(fd < 0)
- error("open %s: %r", buf);
- read(fd, buf, sizeof(buf));
- close(fd);
- p = buf+56+12; /* Do better! */
- while(*p == ' ')
- p--;
- p[1] = '\0';
- return buf+56; /* ditto */
+ return "unknown";
}
blob - 3e6a313dd7fc0fa076c91ea71d10dcd6dd98f05a
blob + 15859dbb538eb139c61e5880a78fba8dfa7d35da
--- src/cmd/acid/util.c
+++ src/cmd/acid/util.c
Lsym *l;
String *file;
ulong v;
- char buf[1024];
+ char buf[65536]; /* Some of those C++ names are really big */
List *list, **tail, *tl;
if(fp == nil)