
On macOS 10.14 Apple changed the command line tools so that system headers now need to be manually installed. Instead of adding one extra install step to the install procedure add a build tag to allow compilation of delve without the native backend on macOS. By default (i.e. when using `go get`) this is how delve will be compiled on macOS, the make script is changed to enable compiling the native backend if the required dependencies have been installed. Insure that both configuration still build correctly on Travis CI and change the documentation to describe how to compile the native backend and that it isn't normally needed. Fixes #1359
44 lines
861 B
C
44 lines
861 B
C
//+build darwin,macnative
|
|
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <mach/mach.h>
|
|
#include <mach/mach_vm.h>
|
|
#include <mach/thread_info.h>
|
|
|
|
int
|
|
write_memory(task_t, mach_vm_address_t, void *, mach_msg_type_number_t);
|
|
|
|
int
|
|
read_memory(task_t, mach_vm_address_t, void *, mach_msg_type_number_t);
|
|
|
|
kern_return_t
|
|
get_registers(mach_port_name_t, x86_thread_state64_t*);
|
|
|
|
kern_return_t
|
|
get_fpu_registers(mach_port_name_t, x86_float_state64_t *);
|
|
|
|
kern_return_t
|
|
set_pc(thread_act_t, uint64_t);
|
|
|
|
kern_return_t
|
|
single_step(thread_act_t);
|
|
|
|
kern_return_t
|
|
clear_trap_flag(thread_act_t);
|
|
|
|
kern_return_t
|
|
resume_thread(thread_act_t);
|
|
|
|
kern_return_t
|
|
set_registers(mach_port_name_t, x86_thread_state64_t*);
|
|
|
|
kern_return_t
|
|
get_identity(mach_port_name_t, thread_identifier_info_data_t *);
|
|
|
|
int
|
|
thread_blocked(thread_act_t thread);
|
|
|
|
int
|
|
num_running_threads(task_t task);
|