Skip to content

Commit 51a1598

Browse files
authoredFeb 12, 2025··
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
1 parent fbaeba3 commit 51a1598

File tree

1 file changed

+5
-0
lines changed
  • portable/ThirdParty/GCC/Posix

1 file changed

+5
-0
lines changed
 

‎portable/ThirdParty/GCC/Posix/port.c

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

0 commit comments

Comments
 (0)
Please sign in to comment.