From owner-p4-projects@FreeBSD.ORG Sun Jun 13 05:58:41 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 01AC516A4D1; Sun, 13 Jun 2004 05:58:40 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D045616A4CE for ; Sun, 13 Jun 2004 05:58:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA01843D31 for ; Sun, 13 Jun 2004 05:58:40 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5D5ujUE033759 for ; Sun, 13 Jun 2004 05:56:45 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5D5uiwQ033756 for perforce@freebsd.org; Sun, 13 Jun 2004 05:56:44 GMT (envelope-from marcel@freebsd.org) Date: Sun, 13 Jun 2004 05:56:44 GMT Message-Id: <200406130556.i5D5uiwQ033756@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 54792 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2004 05:58:41 -0000 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