Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 2003 17:12:20 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        freebsd-ppc@freebsd.org
Subject:   BREAK_TO_DEBUGGER
Message-ID:  <16340.63300.545320.669373@grasshopper.cs.duke.edu>

next in thread | raw e-mail | index | archive | help

May I commit the appended patch?  It allows me to actually
use ddb and BREAK_TO_DEBUGGER.   It seems to work fine:

FreeBSD/powerpc (g4) (ttya)

login: [halt - sent]
Stopped at      0x191184:       or      r26, r3, r26,
db> t
0xeb4d6c20: at zs_intr+0x5c
0xeb4d6c40: at intr_handle+0x38
0xeb4d6c60: at openpic_intr+0x4c
0xeb4d6c80: at powerpc_interrupt+0x5c
0xeb4d6cb0: kernel EXI trap by sched_runnable+20: srr1=0x209032
            r1=0xeb4d6d60 cr=0x40007ba8 xer=0 ctr=0x31a5dc
     <?>  : at idle_proc+0x54
0xeb4d6d60: at _end+0x3fc5ea44
0xeb4d6d70: at idle_proc+0x54
0xeb4d6da0: at fork_exit+0xc4
0xeb4d6dd0: at fork_trampoline+0xc
saved LR(0x7c0802a2) is invalid.
db> c



Thanks,

Drew



Index: powerpc/include/cpufunc.h
===================================================================
RCS file: /home/ncvs/src/sys/powerpc/include/cpufunc.h,v
retrieving revision 1.18
diff -u -r1.18 cpufunc.h
--- powerpc/include/cpufunc.h	23 Feb 2003 13:47:44 -0000	1.18
+++ powerpc/include/cpufunc.h	8 Dec 2003 21:52:27 -0000
@@ -47,16 +47,17 @@
 
 struct thread;
 
-#ifdef __GNUC__
+#ifdef DDB
+void ddb_trap(void);
+#endif
 
 static __inline void
 breakpoint(void)
 {
-
-	return;
-}
-
+#ifdef DDB
+	ddb_trap();
 #endif
+}
 
 /* CPU register mangling inlines */
 



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