summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-09-18 15:06:14 -0700
committerRuss Cox <rsc@golang.org>2008-09-18 15:06:14 -0700
commitca9a8d591e52bf6f5a4f3f3f25657224d27ea54d (patch)
treea7ba61fe4287094feee6403537d2d7429574b1a5
parent711c6813e63965cfba74da1db1ffcbfe062c4d4c (diff)
downloadgolang-ca9a8d591e52bf6f5a4f3f3f25657224d27ea54d.tar.gz
make acid build on linux.
recognize symbol table info again on 64-only linux. R=r DELTA=11 (9 added, 0 deleted, 2 changed) OCL=15486 CL=15486
-rw-r--r--src/libmach_amd64/executable.c4
-rw-r--r--src/libmach_amd64/linux.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/libmach_amd64/executable.c b/src/libmach_amd64/executable.c
index 6c05102ab..deca13cd8 100644
--- a/src/libmach_amd64/executable.c
+++ b/src/libmach_amd64/executable.c
@@ -796,11 +796,11 @@ error:
read(fd, buf, sh[ep->shstrndx].size);
for(i = 0; i < ep->shnum; i++) {
- if (sh[i].type == 2 && strcmp(&buf[sh[i].name], ".gosymtab") == 0) {
+ if (strcmp(&buf[sh[i].name], ".gosymtab") == 0) {
symsize = sh[i].size;
symoff = sh[i].offset;
}
- if (sh[i].type == 2 && strcmp(&buf[sh[i].name], ".gopclntab") == 0) {
+ if (strcmp(&buf[sh[i].name], ".gopclntab") == 0) {
if (sh[i].offset != symoff+symsize) {
werrstr("pc line table not contiguous with symbol table");
free(buf);
diff --git a/src/libmach_amd64/linux.c b/src/libmach_amd64/linux.c
index ee4c8a217..ff4012081 100644
--- a/src/libmach_amd64/linux.c
+++ b/src/libmach_amd64/linux.c
@@ -523,3 +523,12 @@ ptraceerr:
werrstr("ptrace %s register laddr=%d pid=%d: %r", isr ? "read" : "write", laddr, map->pid);
return -1;
}
+
+char*
+procstatus(int pid)
+{
+ if(isstopped(pid))
+ return "Stopped";
+
+ return "Running";
+}