From owner-p4-projects@FreeBSD.ORG Sun May 2 16:04:10 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D55716A4D0; Sun, 2 May 2004 16:04:10 -0700 (PDT) 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 100CB16A4CE for ; Sun, 2 May 2004 16:04:10 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E959443D2F for ; Sun, 2 May 2004 16:04:09 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i42N49Ge003199 for ; Sun, 2 May 2004 16:04:09 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i42N49n6003196 for perforce@freebsd.org; Sun, 2 May 2004 16:04:09 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sun, 2 May 2004 16:04:09 -0700 (PDT) Message-Id: <200405022304.i42N49n6003196@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 52104 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, 02 May 2004 23:04:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=52104 Change 52104 by marcel@marcel_nfs on 2004/05/02 16:03:21 Fix continuation after kdb_enter. Breakpoints are broken, but they are also broken on HEAD (i.e. we break into the debugger, but can't continue after it). Single stepping does not work yet. But again, this is no different than HEAD. Affected files ... .. //depot/projects/gdb/sys/sparc64/include/kdb.h#2 edit .. //depot/projects/gdb/sys/sparc64/sparc64/trap.c#5 edit Differences ... ==== //depot/projects/gdb/sys/sparc64/include/kdb.h#2 (text+ko) ==== @@ -45,7 +45,6 @@ kdb_cpu_trap(int vector, int _) { flushw(); - TF_DONE(kdb_frame); } #endif /* _MACHINE_KDB_H_ */ ==== //depot/projects/gdb/sys/sparc64/sparc64/trap.c#5 (text+ko) ==== @@ -242,7 +242,6 @@ (TRAPF_USERMODE(tf) ? "user" : "kernel"), rdpr(pil)); atomic_add_int(&cnt.v_trap, 1); - td->td_last_frame = tf; if ((tf->tf_tstate & TSTATE_PRIV) == 0) { KASSERT(td != NULL, ("trap: curthread NULL")); @@ -251,6 +250,7 @@ p = td->td_proc; sticks = td->td_sticks; td->td_frame = tf; + td->td_last_frame = tf; if (td->td_ucred != p->p_ucred) cred_update_thread(td); @@ -298,11 +298,20 @@ KASSERT((tf->tf_type & T_KERNEL) != 0, ("trap: kernel trap isn't")); + if (kdb_active) { + kdb_trap(tf->tf_type, 0, tf); + TF_DONE(tf); + return; + } + + td->td_last_frame = tf; + switch (tf->tf_type & ~T_KERNEL) { #ifdef KDB case T_BREAKPOINT: case T_KSTACK_FAULT: error = (kdb_trap(tf->tf_type, 0, tf) == 0); + TF_DONE(tf); break; #ifdef notyet case T_PA_WATCHPOINT: