-
Notifications
You must be signed in to change notification settings - Fork 2
Handle Debugging:Debugger provided Callbacks
Joachim edited this page May 28, 2020
·
3 revisions
typedef mpid_rc_t (*mpid_callback_memory_alloc_fn_t) (
mpid_size_t nbytes,
void **ptr
);
typedef mpid_rc_t (*mpid_callback_memory_free_fn_t) (
void *ptr
);
typedef mpid_rc_t (*mpid_callback_print_string_fn_t) (
const char *string,
int category
);
typedef mpid_rc_t (*mpid_callback_sizeof_fn_t) (
mpid_address_space_context_t *address_space_context,
mpid_device_type_sizes_t *sizes
);
typedef mpid_rc_t
(*mpid_callback_get_thread_context_for_thread_id_fn_t) (
mpid_address_space_context_t *address_space_context,
mpid_thread_id_t kind,
mpid_size_t sizeof_thread_id,
const void *thread_id,
mpid_thread_context_t **thread_context
);
typedef mpid_rc_t (*mpid_callback_symbol_addr_fn_t) (
mpid_address_space_context_t *address_space_context,
mpid_thread_context_t *thread_context, // ?
const char *symbol_name,
mpid_address_t *symbol_addr,
const char *file_name // Necessary to distinguish ambiguous symbols from different object files
);
typedef mpid_rc_t (*mpid_callback_memory_read_fn_t) (
mpid_address_space_context_t *address_space_context,
mpid_thread_context_t *thread_context,
const mpid_address_t *addr,
mpid_size_t nbytes,
void *buffer
);
typedef mpid_rc_t (*mpid_callback_memory_write_fn_t) (
mpid_address_space_context_t *address_space_context,
mpid_thread_context_t *thread_context,
const mpid_address_t *addr,
mpid_size_t nbytes,
const void *buffer
);
typedef mpid_rc_t (*mpid_callback_target_host_fn_t) (
mpid_address_space_context_t *address_space_context,
const void *input,
mpid_size_t unit_size,
mpid_size_t count,
void *output
);
typedef uint64_t mpid_size_t;
typedef uint64_t mpid_addr_t;
typedef int64_t mpid_word_t;
typedef uint64_t mpid_seg_t;
typedef struct mpid_address_t {
mpid_seg_t segment;
mpid_addr_t address;
} mpid_address_t;
typedef uint64_t mpid_thread_id_t;
typedef struct _mpid_aspace_cont mpid_address_space_context_t;
typedef struct _mpid_thread_cont mpid_thread_context_t;
typedef struct mpid_device_type_sizes_t {
uint8_t sizeof_char;
uint8_t sizeof_short;
uint8_t sizeof_int;
uint8_t sizeof_long;
uint8_t sizeof_long_long;
uint8_t sizeof_pointer;
} mpid_device_type_sizes_t;