Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Nov 2009 06:27:46 +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: r198943 - head/sys/arm/arm
Message-ID:  <200911050627.nA56RkZP064907@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Thu Nov  5 06:27:46 2009
New Revision: 198943
URL: http://svn.freebsd.org/changeset/base/198943

Log:
  Implement db_trace_thread() by calling db_stack_trace_cmd() and
  passing a frame pointer that comes from the thread context. This
  fixes DDB backtraces by not unwinding debugger functions first.

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

Modified: head/sys/arm/arm/db_trace.c
==============================================================================
--- head/sys/arm/arm/db_trace.c	Thu Nov  5 06:23:02 2009	(r198942)
+++ head/sys/arm/arm/db_trace.c	Thu Nov  5 06:27:46 2009	(r198943)
@@ -194,13 +194,10 @@ db_md_set_watchpoint(db_expr_t addr, db_
 int
 db_trace_thread(struct thread *thr, int count)
 {
-	uint32_t addr;
+	struct pcb *ctx;
 
-	if (thr == curthread)
-		addr = (uint32_t)__builtin_frame_address(0);
-	else
-		addr = thr->td_pcb->un_32.pcb32_r11;
-	db_stack_trace_cmd(addr, -1);
+	ctx = kdb_thr_ctx(thr);
+	db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1);
 	return (0);
 }
 



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