Add instruction to suppress SIGUSR1 in Posix with LLDB debugger (#1245)

While using the macOS default LLDB debugger, a call to vTaskEndScheduler results in an unhandled SIGUSR1 (aka SIGRESUME) when restoring the scheduler thread's signals with pthread_sigmask. This crashes the program.

Added instructions in portable/ThirdParty/GCC/Posix/port.c to suppress SIGUSR1 to prevent LLDB debugger interference when exiting xPortStartScheduler

Thanks to: @johnboiles for pointing it out in #1224
pull/1234/head
Bhoomika R S 2 weeks ago committed by GitHub
parent fbaeba352e
commit 51a1598e4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -48,6 +48,11 @@
* stdio (printf() and friends) should be called from a single task * stdio (printf() and friends) should be called from a single task
* only or serialized with a FreeRTOS primitive such as a binary * only or serialized with a FreeRTOS primitive such as a binary
* semaphore or mutex. * semaphore or mutex.
*
* Note: When using LLDB (the default debugger on macOS) with this port,
* suppress SIGUSR1 to prevent debugger interference. This can be
* done by adding the following line to ~/.lldbinit:
* `process handle SIGUSR1 -n true -p true -s false`
*----------------------------------------------------------*/ *----------------------------------------------------------*/
#ifdef __linux__ #ifdef __linux__
#define _GNU_SOURCE #define _GNU_SOURCE

Loading…
Cancel
Save