This PR adds the constants from mach/arm/thread_status.h and the arm64_thread_state64_t struct, and puts the code specific to x86_64 behind a x86_64 architecture gate. This also updates the example to dump process registers.
This also fixes a bug in the example where it calls free on the thread_list instead of mach_vm_deallocate. Finally, this also updates the README to explain how to run the example on MacOS 12.4 since the current example makes use of task_for_pid() which requires SIP to be disabled.
I have tested this on a Mac Mini (Apple M1) with MacOS 12.4.
This PR adds the constants from mach/arm/thread_status.h and the
arm64_thread_state64_t
struct, and puts the code specific to x86_64 behind a x86_64 architecture gate. This also updates the example to dump process registers.This also fixes a bug in the example where it calls
free
on the thread_list instead ofmach_vm_deallocate
. Finally, this also updates the README to explain how to run the example on MacOS 12.4 since the current example makes use oftask_for_pid()
which requires SIP to be disabled.I have tested this on a Mac Mini (Apple M1) with MacOS 12.4.