From owner-freebsd-arch@FreeBSD.ORG Wed Jul 30 14:08:47 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A014737B401 for ; Wed, 30 Jul 2003 14:08:47 -0700 (PDT) Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1119643FA3 for ; Wed, 30 Jul 2003 14:08:47 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 19227 invoked from network); 30 Jul 2003 21:08:46 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 30 Jul 2003 21:08:46 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h6UL8iGI068948 for ; Wed, 30 Jul 2003 17:08:45 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 30 Jul 2003 17:09:05 -0400 (EDT) From: John Baldwin To: arch@FreeBSD.org Subject: Make long ddb not suck X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2003 21:08:47 -0000 I have a patch that adds a simple paging facility to ddb at the db_printf() level using a one-shot callback mechanism. It includes a simple paging callback that rearms itself based on the users input (space does another page, enter another line). I've used this facility to replace the hand-rolled paging in 'ps', 'show pci', and 'show ktr'. The patch is at http://www.FreeBSD.org/~jhb/patches/ddb.patch Comments? Also, I notice that we have a 'show threads' command commented out from the original Mach sources. I think we should change 'ps' back to just showing simple process info (and hopefully back to 80 cols) and only print thread info for 'show threads'. Maybe show threads should take a PID as the argument? Thus, one would have: db> ps 1 blah blah sleeping on "foo" 2 blah blah threaded db> show threads 2 0 blah blah sleeping on "bar" 1 blah blah running on cpuX etc. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/