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.
On 1/10/2024 7:36 PM, yfliu2008 wrote:
Spudaneco,
Can you share more details about how to break in "nsh_parse()" with
"rv-virt/knsh64"?
Regards,
yf
Original
From:"spudaneco"<[email protected] >;
Date:2024/1/10 20:29
To:"dev"<[email protected] >;
Subject:Re:Re: debugging user app crashes
You should be able to set breakpoints properly, but only after the correct MMU
mapping is in place.