]> Cypherpunks repositories - gostls13.git/commitdiff
make acid build on linux.
authorRuss Cox <rsc@golang.org>
Thu, 18 Sep 2008 22:06:14 +0000 (15:06 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 18 Sep 2008 22:06:14 +0000 (15:06 -0700)
recognize symbol table info again on 64-only linux.

R=r
DELTA=11  (9 added, 0 deleted, 2 changed)
OCL=15486
CL=15486

src/libmach_amd64/executable.c
src/libmach_amd64/linux.c

index 6c05102ab0aa6ad5bc0a93de1b5e6e0d7d7df4c0..deca13cd873695ee0e4a8c5e9173b8bc27fd69c6 100644 (file)
@@ -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);
index ee4c8a2177fe44ff179339f6f82c24f5cb9dc799..ff4012081b8c9187680117a797d18acea1e2462f 100644 (file)
@@ -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";
+}