From owner-freebsd-hackers Fri Apr 6 2: 5:59 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id 32B9237B496; Fri, 6 Apr 2001 02:05:53 -0700 (PDT) (envelope-from bp@butya.kz) Received: by relay.butya.kz (Postfix, from userid 1000) id 9A88628C5E; Fri, 6 Apr 2001 16:05:46 +0700 (ALMST) Received: from localhost (localhost [127.0.0.1]) by relay.butya.kz (Postfix) with ESMTP id 7F95B28A2C; Fri, 6 Apr 2001 16:05:46 +0700 (ALMST) Date: Fri, 6 Apr 2001 16:05:46 +0700 (ALMST) From: Boris Popov To: John Baldwin Cc: hackers@FreeBSD.org Subject: Re: New DDB commands In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 6 Apr 2001, John Baldwin wrote: > 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. Thats exactly what doctor ordered! This significantly simplifies amount of work needs to be done when there is a need to trace where process is hung. > 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. Well, when I manage my kernel to boot with witness, spinlock list will be a big help. -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message