You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "nealef (via GitHub)" <gi...@apache.org> on 2023/12/22 06:01:54 UTC

Re: [I] Adding signal handing for SEGV/BUS/... [nuttx]

nealef commented on issue #10898:
URL: https://github.com/apache/nuttx/issues/10898#issuecomment-1867277644

   > @nealef do you want to continue after memfault? the default memfault handler doesn't support this feature yet, I think you may need skip the broken instruction before return.
   
   I suppose I should ask a more fundamental question: when a userland program issues a `signal()` what is the mechanism of returning from that syscall after the kernel has scheduled a signal handler? That is, the syscall is handled by checking if there is a corresponding signal handler and if so using `nxsig_tcbdispatch()` to schedule the handler it then returns from the syscall. What is the mechanism used to return from that call?  
   
   As you can see in my case when I leave `exception_common` the `up_sigdeliver()` function is what gets branched to. I am assuming this guy is supposed to run (in my configuration) in protected mode but is in userland mode instead (for wont of a better term). `up_sigdeliver` (or `arm_sigdeliver` as it is now) appears to do the returning to userland. So should my code set up the return register to be 0xfffffff[1|9] so that the signal deliver is invoked in the correct mode?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org