Thread (5 messages) flat view 5 messages, 4 authors, 2007-09-05

Re: Breakpoint is not hitting for Kernel Debugging

From: Dan Malek <hidden>
Date: 2007-09-03 19:27:37

On Sep 3, 2007, at 7:02 AM, dnl wrote:
Hi all,

I am using uboot and montavista kernel for our custom MPC8555CDS  
board.
You should contact MontaVista first, since we really
don't know what your source code looks like.  I'm
assuming it's a ppc, not powerpc, although the patch
is similar for either choice.  I'd suggest this as a starting
point:

diff -Naru linux-2.6.21/arch/ppc/kernel/head_fsl_booke.S linux-2.6.21- 
dbg/arch/ppc/kernel/head_fsl_booke.S
--- linux-2.6.21/arch/ppc/kernel/head_fsl_booke.S       2007-07-05  
13:08:16.000000000 -0800
+++ linux-2.6.21-dbg/arch/ppc/kernel/head_fsl_booke.S   2007-07-10  
03:45:33.000000000 -0800
@@ -317,6 +322,16 @@
         /* clear any residual debug events */
         li      r2,-1
         mtspr   SPRN_DBSR,r2
+#else
+       /* Enable BDI200 debugging beyond this point for "normal"
+        * kernel debugging.  If you are debugging code prior to this
+        * point, it needs to be done with more specific set up
+        * of configuration files and boot rom.
+        */
+       mfmsr   r2
+       ori     r2, r2, MSR_DE
+       mtmsr   r2
+       isync
#endif

Your first breakpoint should be a hard breakpoint
at the label start_kernel.  You can then switch to
soft breakpoints and continue your debugging.

Ultimate Solutions have some useful white papers
on kernel debugging with the BDI2000 (that some
people have plagiarized).  Check out ultsol.com

Good Luck.

	-- Dan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help