From 794adb75eed596fe830ab96b1ccfee6b97bd3f3d Mon Sep 17 00:00:00 2001 From: David Xu Date: Fri, 16 Jul 2004 06:11:48 +0000 Subject: ptrace's first parameter is command not pid. pointy hat to me. --- gnu/usr.bin/gdb/libgdb/fbsd-threads.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/usr.bin/gdb/libgdb/fbsd-threads.c b/gnu/usr.bin/gdb/libgdb/fbsd-threads.c index d0bee7d75c1e6..7110c8ce8dd74 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 -- cgit v1.3