Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2004 05:56:44 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 54792 for review
Message-ID:  <200406130556.i5D5uiwQ033756@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54792

Change 54792 by marcel@marcel_nfs on 2004/06/13 05:56:44

	Remove references to td_last_frame. All backtraces start off with
	a call frame now. Use the new kdb_thr_ctx() to get the initial
	context of the given thread.

Affected files ...

.. //depot/projects/gdb/sys/i386/i386/db_trace.c#7 edit

Differences ...

==== //depot/projects/gdb/sys/i386/i386/db_trace.c#7 (text+ko) ====

@@ -429,7 +429,6 @@
 db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
     char *modif)
 {
-	struct trapframe *tf;
 	struct thread *td;
 
 	td = (have_addr) ? kdb_thr_lookup(addr) : kdb_thread;
@@ -437,9 +436,7 @@
 		db_printf("Thread %d not found\n", addr);
 		return;
 	}
-	tf = td->td_last_frame;
-	db_backtrace(td, tf, (struct i386_frame *)tf->tf_ebp,
-	    (db_addr_t)tf->tf_eip, count);
+	db_trace_thread(td, count);
 }
 
 void
@@ -459,11 +456,11 @@
 int
 db_trace_thread(struct thread *thr, int count)
 {
-	struct trapframe *tf;
+	struct pcb *ctx;
 
-	tf = thr->td_last_frame;
-	return (db_backtrace(thr, tf, (struct i386_frame *)tf->tf_ebp,
-		(db_addr_t)tf->tf_eip, count));
+	ctx = kdb_thr_ctx(thr);
+	return (db_backtrace(thr, NULL, (struct i386_frame *)ctx->pcb_ebp,
+		    ctx->pcb_eip, count));
 }
 
 int



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