PERFORCE change 52104 for review

Marcel Moolenaar marcel at FreeBSD.org
Sun May 2 16:04:10 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=52104

Change 52104 by marcel at 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:


More information about the p4-projects mailing list