You should be able to set breakpoints properly, but only after the correct MMU 
mapping is in place.
-------- Original message --------From: yfliu2008 <yfliu2...@qq.com.INVALID> 
Date: 1/9/24  8:06 PM  (GMT-06:00) To: dev <dev@nuttx.apache.org> Subject: 
Re:Re: debugging user app crashes Yes, in kernel mode each user space program 
has similar but isolated virtual address spaces. So it seems that we can't set 
break points to them like FLAT or PROTECTED build.Not sure if we need some sort 
of debug agent in KERNEL build so that it can help debugging&nbsp; user space 
tasks. When use of kernel build araises, this need will increase I 
guess.Regards,yf                       Original                                 
           From:"Alan C. Assis"< acas...@gmail.com &gt;;Date:2024/1/10 
9:47To:"dev"< dev@nuttx.apache.org &gt;;Subject:Re: debugging user app 
crashesYes! For kernel mode each program has its own main() implementation, 
notthe definition.BR,AlanOn Tue, Jan 9, 2024 at 10:34 PM Gregory Nutt  
wrote:&gt;&gt; On 1/9/2024 7:28 PM, Alan C. Assis wrote:&gt; &gt; Hi Yf,&gt; 
&gt; Just look at your System.map and you will see that all those main()&gt; 
became&gt; &gt; _main.&gt; &gt;&gt; &gt; It isn't possible to have a unique 
main() symbol, otherwise we will have&gt; a&gt; &gt; duplicated symbol, also 
even if the compiler accepted that, how could&gt; NuttX&gt; &gt; know you want 
to call the main from Hello instead of the main from Alarm?&gt; &gt;&gt; &gt; 
BR,&gt; &gt;&gt; &gt; Alan&gt; This is not true in the kernel build mode.  All 
applications run at&gt; exactly the same virtual address and the entry point is 
main() for all&gt; of them.  In the kernel build, all applications are loadable 
modules.&gt; None of the symbols in the loadable modules will appear in 
System.map&gt; since each application module is separately compiled and linked.

Reply via email to