On Thu, Jan 11, 2024 at 10:35 AM Gregory Nutt <spudan...@gmail.com> wrote:

> Everything you need to know is in that referenced wiki page:
>
> https://cwiki.apache.org/confluence/display/NUTTX/Debugging+ELF+Loadable+Modules
>
> I don't know anything about QEMU or RISC-V.  But assuming that NSH is
> your init application...
>
>   * NSH is not in memory when you start the OS; it resides in your init
>     file.  The OS will automatically start NSH as the init application
>     (if properly configured).
>   * Since there is no gdbserver or ptrace, there is not elegant way to
>     break into the program.  Some kludgey ways to do that are described
>     in the referenced wiki page.
>   * Then just follow the instructions in the wiki page:
>       o Start the debugger
>       o Load the symbol table of the NSH application.  You probably
>         don't need as load offset as described in the wiki page.
>       o Set a breakpoint at nsh_parse, and
>       o Continue
>
> I have nothing to add to that.



Note to self: Check whether above-linked wiki page has been migrated to
Documentation in the repository and, if not, migrate it...

I likely won't be able to work on that until next week, so if someone else
wants to do it, feel free. :-)

Cheers
Nathan

Reply via email to