How can I create a memory dump of a process under Mac OS? --> dump all occupied memory of a process into a file for analysis.
Asked
Active
Viewed 1.0k times
1 Answers
10
You might need to disable system integrity protection for this to work - beware that this is a security risk and you should re-enable after you are done.
- restart into Recovery Mode,
csrutil disable
via the terminal- restart
In your new session, run 'top', find your process ID.
lldb --attach-pid <PID>
process save-core "filename"
Restart into recovery, and reenable system integrity protection.

deefunkt
- 331
- 2
- 12
-
Never reenable system integrity protection – genghiskhan May 01 '21 at 19:47
-
On MacOS 11.5.1 it was not necessary to disable system integrity protection. – vy32 Aug 10 '21 at 12:54