]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/libmach/map.c
python: arm64 support
[plan9front.git] / sys / src / libmach / map.c
index c668defd12c4549c11c63f5315f326d307595c4f..1cd142c586e415087ece42b6292398c9d6a240a9 100644 (file)
@@ -108,11 +108,8 @@ attachproc(int pid, int kflag, int corefd, Fhdr *fp)
        if (mach->fpregsize) {
                sprint(buf, "/proc/%d/fpregs", pid);
                fd = open(buf, mode);
-               if(fd < 0) {
-                       close(map->seg[0].fd);
-                       free(map);
-                       return 0;
-               }
+               if(fd < 0)
+                       fd = open("/dev/zero", OREAD);
                setmap(map, fd, mach->regsize, mach->regsize+mach->fpregsize, 0, "fpregs");
        }
        setmap(map, corefd, fp->txtaddr, fp->txtaddr+fp->txtsz, fp->txtaddr, "text");