diff options
author | davidxu <davidxu@FreeBSD.org> | 2004-07-16 06:11:48 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2004-07-16 06:11:48 +0000 |
commit | 9ff80f3e79f9930822ff4ff965d0845033e88843 (patch) | |
tree | c2b86c02a0bd4e90b35d262b9c721122c299a1c4 /gnu | |
parent | 1322682b8dca5aa97bdfab174fd0a9b2dcad70a5 (diff) | |
download | FreeBSD-src-9ff80f3e79f9930822ff4ff965d0845033e88843.zip FreeBSD-src-9ff80f3e79f9930822ff4ff965d0845033e88843.tar.gz |
ptrace's first parameter is command not pid. pointy hat to me.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/gdb/libgdb/fbsd-threads.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/usr.bin/gdb/libgdb/fbsd-threads.c b/gnu/usr.bin/gdb/libgdb/fbsd-threads.c index d0bee7d..7110c8c 100644 --- a/gnu/usr.bin/gdb/libgdb/fbsd-threads.c +++ b/gnu/usr.bin/gdb/libgdb/fbsd-threads.c @@ -1078,13 +1078,17 @@ ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid, ps_err_e ps_lstop(struct ps_prochandle *ph, lwpid_t lwpid) { - return (ptrace (lwpid, PT_SUSPEND, 0, 0) == 0); + if (ptrace (PT_SUSPEND, lwpid, 0, 0) == -1) + return PS_ERR; + return PS_OK; } ps_err_e ps_lcontinue(struct ps_prochandle *ph, lwpid_t lwpid) { - return (ptrace (lwpid, PT_RESUME, 0, 0) == 0); + if (ptrace (PT_RESUME, lwpid, 0, 0) == -1) + return PS_ERR; + return PS_OK; } pid_t |