github.com/undoio/delve@v1.9.0/pkg/proc/native/threads_darwin.h (about)

     1  //+build darwin,macnative
     2  
     3  #include <stdlib.h>
     4  #include <sys/types.h>
     5  #include <mach/mach.h>
     6  #include <mach/mach_vm.h>
     7  #include <mach/thread_info.h>
     8  
     9  int
    10  write_memory(task_t, mach_vm_address_t, void *, mach_msg_type_number_t);
    11  
    12  int
    13  read_memory(task_t, mach_vm_address_t, void *, mach_msg_type_number_t);
    14  
    15  kern_return_t
    16  get_registers(mach_port_name_t, x86_thread_state64_t*);
    17  
    18  kern_return_t
    19  get_fpu_registers(mach_port_name_t, x86_float_state64_t *);
    20  
    21  kern_return_t
    22  set_pc(thread_act_t, uint64_t);
    23  
    24  kern_return_t
    25  single_step(thread_act_t);
    26  
    27  kern_return_t
    28  clear_trap_flag(thread_act_t);
    29  
    30  kern_return_t
    31  resume_thread(thread_act_t);
    32  
    33  kern_return_t
    34  set_registers(mach_port_name_t, x86_thread_state64_t*);
    35  
    36  kern_return_t
    37  get_identity(mach_port_name_t, thread_identifier_info_data_t *);
    38  
    39  int
    40  thread_blocked(thread_act_t thread);
    41  
    42  int
    43  num_running_threads(task_t task);