aboutsummaryrefslogtreecommitdiff
path: root/src/libmach/Linux.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-02-11 00:01:49 +0000
committerrsc <devnull@localhost>2005-02-11 00:01:49 +0000
commit281c90a5be6b1ab2280ffa23885fe41e7af80bce (patch)
treec26a67c58f869a3a6821f1a0ae980af03d4eb430 /src/libmach/Linux.c
parentce2a378d46c0bcd00ec08b9bc4ad861c8aa28a2f (diff)
downloadplan9port-281c90a5be6b1ab2280ffa23885fe41e7af80bce.tar.gz
plan9port-281c90a5be6b1ab2280ffa23885fe41e7af80bce.tar.bz2
plan9port-281c90a5be6b1ab2280ffa23885fe41e7af80bce.zip
more pthread
Diffstat (limited to 'src/libmach/Linux.c')
-rw-r--r--src/libmach/Linux.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/libmach/Linux.c b/src/libmach/Linux.c
index ff727409..893ef6b4 100644
--- a/src/libmach/Linux.c
+++ b/src/libmach/Linux.c
@@ -447,6 +447,47 @@ proctextfile(int pid)
return nil;
}
+int
+sys_ps_lgetregs(struct ps_prochandle *ph, uint tid, void *regs)
+{
+ int i, oldpid;
+ uint u, *uregs;
+
+ oldpid = corpid;
+ ptraceattach(tid);
+ uregs = (uint*)regs;
+ for(i=0; i<sizeof(UregLinux386)/sizeof(uint); i++){
+ errno = 0;
+ u = ptrace(PTRACE_PEEKUSER, tid, 4*i, 0);
+ if(errno)
+ return 1;
+ uregs[i] = u;
+ }
+ ptraceattach(oldpid);
+ return 0;
+}
+
+int
+sys_ps_lsetregs(struct ps_prochandle *ph, uint tid, void *regs)
+{
+ return 1;
+}
+
+int
+sys_ps_lgetfpregs(struct ps_prochandle *ph, uint tid, void *regs)
+{
+ return 1;
+}
+
+
+int
+sys_ps_lsetfpregs(struct ps_prochandle *ph, uint tid, void *regs)
+{
+ return 1;
+}
+
+
+
#if 0
snprint(buf, sizeof buf, "/proc/%d/maps", pid);