From owner-freebsd-hackers Sat Feb 9 15: 8:13 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 8EE7137B416 for ; Sat, 9 Feb 2002 15:08:09 -0800 (PST) Received: from opal (cs.binghamton.edu [128.226.123.101]) by bingnet2.cc.binghamton.edu (8.11.6/8.11.6) with ESMTP id g19N85Q02248; Sat, 9 Feb 2002 18:08:05 -0500 (EST) Date: Sat, 9 Feb 2002 18:08:04 -0500 (EST) From: Zhihui Zhang X-Sender: zzhang@opal To: Dag-Erling Smorgrav Cc: freebsd-hackers@freebsd.org Subject: Re: Ptrace and SIGTRAP problem In-Reply-To: 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 On 9 Feb 2002, Dag-Erling Smorgrav wrote: > Zhihui Zhang writes: > > - PT_CONTINUE + waitpid() works fine, the trace program prints out values. > > This is expected behaviour. > > > - PT_CONTINUE alone does not work but no core-dump caused by SIGTRAP > > - PT_DETACH + waitpid() does not work and core-dump > > - PT_DETACH alone does not work and core-dump. > > These three cases are unexpected. I'll have to dig some more into > this, but I'm afraid I won't have time until some time next week. > > > Who is sending the SIGRAP (5) signal? > > execve(2) in kern_exec.c posts SIGTRAP if the process has debugging > turned on (which it does as a result of PT_TRACE_ME). This is one time thing. It will be catched by the first wait() call in the parent process. Thanks for your reply. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message