From owner-freebsd-hackers Fri Apr 6 0:32:13 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 3972B37B43C for ; Fri, 6 Apr 2001 00:32:11 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f367VvG02837 for ; Fri, 6 Apr 2001 00:31:57 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Fri, 06 Apr 2001 00:31:34 -0700 (PDT) From: John Baldwin To: hackers@FreeBSD.org Subject: New DDB commands Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hey all, I have two new ddb commands for the i386. Porting them to other platforms shouldn't be overly difficult. Both of them are "show" commands. The first is a 'show ptrace XX' command which displays a backtrace of the process with the decimal pid XX. Since ddb always assumes any address (i.e. parameter) is in hex, I had to do some funky shifting to make it more intuitive. As a result, both 'show ptrace 15' and 'show ptrace 0x15' will give a backtrace for process 15. If no pid is specified, then it acts just like 'show trace' and displays the current process' trace. The second command is 'show pcpu xx' which displays some of the per-cpu data for the cpu with the cpuid xx. If an id is not specified, then the current CPU's info is displayed. Currently the only fields displayed are the cpuid, curproc, curpcb, and npxproc fields. In addition, if witness is compiled into the kernel, then a list of spinlocks held by the CPU in question is listed. The patches can be found at http://www.FreeBSD.org/~jhb/patches/ptrace.patch and http://www.FreeBSD.org/~jhb/patches/pcpu.patch respectively. I will find these new commands useful and would like to commit them if there aren't any objections. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message