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 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 >;Date:2024/1/10
9:47To:"dev"< dev@nuttx.apache.org >;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:>> On 1/9/2024 7:28 PM, Alan C. Assis wrote:> > Hi Yf,>
> Just look at your System.map and you will see that all those main()>
became> > _main.> >> > It isn't possible to have a unique
main() symbol, otherwise we will have> a> > duplicated symbol, also
even if the compiler accepted that, how could> NuttX> > know you want
to call the main from Hello instead of the main from Alarm?> >> >
BR,> >> > Alan> This is not true in the kernel build mode. All
applications run at> exactly the same virtual address and the entry point is
main() for all> of them. In the kernel build, all applications are loadable
modules.> None of the symbols in the loadable modules will appear in
System.map> since each application module is separately compiled and linked.