Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 2010 16:14:35 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203171 - head/sys/arm/arm
Message-ID:  <201001291614.o0TGEZ7m010661@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Fri Jan 29 16:14:35 2010
New Revision: 203171
URL: http://svn.freebsd.org/changeset/base/203171

Log:
  When backtracing self, start with the current frame (i.e. the
  frame of db_trace_self()) and not the caller's frame. The use
  of builtin_frame_address(1) to get the caller's frame is not
  reliable and can cause panics.

Modified:
  head/sys/arm/arm/db_trace.c

Modified: head/sys/arm/arm/db_trace.c
==============================================================================
--- head/sys/arm/arm/db_trace.c	Fri Jan 29 15:58:12 2010	(r203170)
+++ head/sys/arm/arm/db_trace.c	Fri Jan 29 16:14:35 2010	(r203171)
@@ -206,6 +206,6 @@ db_trace_self(void)
 {
 	db_addr_t addr;
 
-	addr = (db_addr_t)__builtin_frame_address(1);
+	addr = (db_addr_t)__builtin_frame_address(0);
 	db_stack_trace_cmd(addr, -1);
 }



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