From owner-cvs-all@FreeBSD.ORG Mon Jul 12 05:07:50 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B00A616A4CE; Mon, 12 Jul 2004 05:07:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA9C143D55; Mon, 12 Jul 2004 05:07:50 +0000 (GMT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i6C57om5001346; Mon, 12 Jul 2004 05:07:50 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6C57ooG001345; Mon, 12 Jul 2004 05:07:50 GMT (envelope-from marcel) Message-Id: <200407120507.i6C57ooG001345@repoman.freebsd.org> From: Marcel Moolenaar Date: Mon, 12 Jul 2004 05:07:50 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_exit.c kern_sig.c sys_process.c src/sys/sys proc.h ptrace.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2004 05:07:50 -0000 marcel 2004-07-12 05:07:50 UTC FreeBSD src repository Modified files: sys/kern kern_exit.c kern_sig.c sys_process.c sys/sys proc.h ptrace.h Log: Implement the PT_LWPINFO request. This request can be used by the tracing process to obtain information about the LWP that caused the traced process to stop. Debuggers can use this information to select the thread currently running on the LWP as the current thread. The request has been made compatible with NetBSD for as much as possible. This implementation differs from NetBSD in the following ways: 1. The data argument is allowed to be smaller than the size of the ptrace_lwpinfo structure known to the kernel, but not 0. This is opposite to what NetBSD allows. The reason for this is that we can extend the structure without affecting older binaries. 2. On NetBSD the tracing process is to set the pl_lwpid field to the Id of the LWP it wants information of. We don't do that. Our ptrace interface allows passing the LWP Id instead of the PID. The tracing process is to set the PID to the LWP Id it wants information of. 3. When the PID is actually the PID of the tracing process, this request returns the information about the LWP that caused the process to stop. This was the whole purpose of the request in the first place. When the traced process has exited, this request will return the LWP Id 0, indicating that the process state is not the result of an event specific to a LWP. Revision Changes Path 1.239 +1 -0 src/sys/kern/kern_exit.c 1.283 +3 -0 src/sys/kern/kern_sig.c 1.122 +19 -0 src/sys/kern/sys_process.c 1.385 +1 -0 src/sys/sys/proc.h 1.23 +9 -0 src/sys/sys/ptrace.h