Acho que descobri algo que funciona.
Eu usei um programa chamado LaunchControl para criar um arquivo chamado enable core dumps.plist
at /System/Library/LaunchDaemons
com o seguinte conteúdo :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GroupName</key>
<string>wheel</string>
<key>InitGroups</key>
<true/>
<key>Label</key>
<string>core dumps launchctl</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
<string>core</string>
<string>unlimited</string>
<string>unlimited</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>root</string>
</dict>
</plist>
com estas permissões:
$ ls -al enable\ core\ dumps.plist
-rw-r--r-- 1 root wheel 582 Dec 30 15:38 enable core dumps.plist
e isso pareceu fazer o truque:
$ launchctl limit core
core unlimited unlimited
$ ulimit -a core
core file size (blocks, -c) unlimited
...
<output snipped>
...
Eu criei um pequeno programa de teste que apenas trava:
$ ./a.out
Segmentation fault: 11 (core dumped)
E, voila, um dump de núcleo foi gerado:
$ # ls -al /cores/
total 895856
drwxrwxr-t@ 3 root admin 102 Dec 30 15:55 .
drwxr-xr-x 31 root wheel 1122 Oct 18 10:32 ..
-r-------- 1 root admin 458678272 Dec 30 15:55 core.426