From owner-cvs-all Thu Sep 19 11:46:34 2002 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 5824B37B48F; Thu, 19 Sep 2002 11:46:30 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12AFC43E4A; Thu, 19 Sep 2002 11:46:30 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from freefall.freebsd.org (jhb@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8JIkTCo012513; Thu, 19 Sep 2002 11:46:29 -0700 (PDT) (envelope-from jhb@freefall.freebsd.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8JIkTKH012512; Thu, 19 Sep 2002 11:46:29 -0700 (PDT) Message-Id: <200209191846.g8JIkTKH012512@freefall.freebsd.org> From: John Baldwin Date: Thu, 19 Sep 2002 11:46:29 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/alpha/alpha db_trace.c src/sys/i386/i386 db_trace.c src/sys/ia64/ia64 db_trace.c src/sys/powerpc/powerpc db_trace.c src/sys/sparc64/sparc64 db_trace.c src/sys/ddb ddb.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jhb 2002/09/19 11:46:29 PDT Modified files: sys/alpha/alpha db_trace.c sys/i386/i386 db_trace.c sys/ia64/ia64 db_trace.c sys/powerpc/powerpc db_trace.c sys/sparc64/sparc64 db_trace.c sys/ddb ddb.h Log: Implement db_print_backtrace() if DDB is compiled into the kernel. This MD function is just a wrapper around db_stack_trace_cmd() that prints out a backtrace of curthread. Currently, this function is only implemented on i386 and alpha (and the alpha version isn't quite tested yet, will do that in a bit). Other changes: - For i386, fix a bug in the raw frame address case. The eip we extract from the passed in frame address does not match the frame we received. Thus, instead of printing a bogus frame with the wrong eip, go ahead and advance frame down to the same frame as the eip we are using. - For alpha, attempt to add a way of doing a raw trace for alpha. Instead of passing a frame address in 'addr', pass in a pointer to a structure containing PC and KSP and use those to start the backtrace. The alpha db_print_backtrace() uses asm to read in the current PC and KSP values into such a request. Tested on: i386 Requested by: many Revision Changes Path 1.13 +25 -2 src/sys/alpha/alpha/db_trace.c 1.29 +3 -0 src/sys/ddb/ddb.h 1.49 +9 -0 src/sys/i386/i386/db_trace.c 1.12 +5 -0 src/sys/ia64/ia64/db_trace.c 1.2 +4 -0 src/sys/powerpc/powerpc/db_trace.c 1.13 +5 -0 src/sys/sparc64/sparc64/db_trace.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message