From owner-p4-projects@FreeBSD.ORG Tue Jul 6 01:37:01 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 77F3416A4E2; Tue, 6 Jul 2004 01:37:01 +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 179DF16A4D3 for ; Tue, 6 Jul 2004 01:37:01 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11B7D43D1F for ; Tue, 6 Jul 2004 01:37:01 +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 i661b0AP098822 for ; Tue, 6 Jul 2004 01:37:00 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i661b0Nd098819 for perforce@freebsd.org; Tue, 6 Jul 2004 01:37:00 GMT (envelope-from marcel@freebsd.org) Date: Tue, 6 Jul 2004 01:37:00 GMT Message-Id: <200407060137.i661b0Nd098819@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 56564 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: Tue, 06 Jul 2004 01:37:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=56564 Change 56564 by marcel@marcel_nfs on 2004/07/06 01:36:46 Implement makectx() on sparc64. Tested and working. This is a rather minimal implementation, but I guess it's enough. Note that backtraces are weird on sparc64. It's not showing the innermost frame... Affected files ... .. //depot/projects/gdb/sys/sparc64/sparc64/machdep.c#7 edit Differences ... ==== //depot/projects/gdb/sys/sparc64/sparc64/machdep.c#7 (text+ko) ==== @@ -567,6 +567,21 @@ } #endif +/* + * Construct a PCB from a trapframe. This is called from kdb_trap() where + * we want to start a backtrace from the function that caused us to enter + * the debugger. We have the context in the trapframe, but base the trace + * on the PCB. The PCB doesn't have to be perfect, as long as it contains + * enough for a backtrace. + */ +void +makectx(struct trapframe *tf, struct pcb *pcb) +{ + + pcb->pcb_pc = tf->tf_tpc; + pcb->pcb_sp = tf->tf_sp; +} + int get_mcontext(struct thread *td, mcontext_t *mc, int flags) {