Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2010 07:38:45 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r213552 - stable/8/sys/kern
Message-ID:  <201010080738.o987cjfd082966@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Oct  8 07:38:44 2010
New Revision: 213552
URL: http://svn.freebsd.org/changeset/base/213552

Log:
  MFC r212964: kdb_backtrace: stack(9)-based code to print backtrace
  without any backend

Modified:
  stable/8/sys/kern/subr_kdb.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/kern/subr_kdb.c
==============================================================================
--- stable/8/sys/kern/subr_kdb.c	Fri Oct  8 07:36:30 2010	(r213551)
+++ stable/8/sys/kern/subr_kdb.c	Fri Oct  8 07:38:44 2010	(r213552)
@@ -28,6 +28,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_kdb.h"
+#include "opt_stack.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -37,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/pcpu.h>
 #include <sys/proc.h>
 #include <sys/smp.h>
+#include <sys/stack.h>
 #include <sys/sysctl.h>
 
 #include <machine/kdb.h>
@@ -300,6 +302,15 @@ kdb_backtrace(void)
 		printf("KDB: stack backtrace:\n");
 		kdb_dbbe->dbbe_trace();
 	}
+#ifdef STACK
+	else {
+		struct stack st;
+
+		printf("KDB: stack backtrace:\n");
+		stack_save(&st);
+		stack_print(&st);
+	}
+#endif
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010080738.o987cjfd082966>