From owner-freebsd-hackers Wed May 30 6:55:56 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from sivka.carrier.kiev.ua (sivka.carrier.kiev.ua [193.193.193.101]) by hub.freebsd.org (Postfix) with ESMTP id 2131F37B422 for ; Wed, 30 May 2001 06:55:50 -0700 (PDT) (envelope-from diman@asd-g.com) Received: from core.is.kiev.ua (p187.is.kiev.ua [62.244.5.187] (may be forged)) by sivka.carrier.kiev.ua (8/Kilkenny_is_better) with ESMTP id QVK48964; Wed, 30 May 2001 16:55:41 +0300 (EEST) (envelope-from diman@asd-g.com) Received: from [10.203.1.10] ([10.203.1.10]) by core.is.kiev.ua (8.11.1/ASDG-2.3-NR) with ESMTP id f4UDteM34096; Wed, 30 May 2001 16:55:40 +0300 (EEST) (envelope-from diman@asd-g.com) Date: Wed, 30 May 2001 13:52:06 +0000 (GMT) From: diman X-Sender: diman@portal.none.ua To: Jiangyi Liu Cc: freebsd-hackers@FreeBSD.org Subject: Re: Weird PT_DETACH In-Reply-To: <000b01c0e90a$2ee15d00$a701160a@fatcow> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG If i understand ptrace(2) manual page correctly, you should use ptrace(PT_DETACH,pid,(caddr_t)1,0) instead of ptrace(PT_DETACH,pid,0,0) . BTW you code is *very hard to debug* on my 4.1.1 :) What your uname -a tells you? On Wed, 30 May 2001, Jiangyi Liu wrote: > Hi, > > Sorry I didn't point out that my purpose is just to stop the debugging and leave the subprocess alone. It's supposed after PT_DETACH, the subprocess should continue, but it didn't. That's what I felt weird. Any clue? > > ----- Original Message ----- > From: "diman" > To: "Jiangyi Liu" > Cc: > Sent: Wednesday, May 30, 2001 8:54 PM > Subject: Re: Weird PT_DETACH > > > > > > > > To attach debugger to a process please use PT_ATTACH > > request instead of PT_DETACH. Use PT_DETACH to stop > > debugging a process and leave it alone. > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message