1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2209045adSStephane Eranian #ifndef __JVMTI_AGENT_H__ 3209045adSStephane Eranian #define __JVMTI_AGENT_H__ 4209045adSStephane Eranian 5209045adSStephane Eranian #include <sys/types.h> 6209045adSStephane Eranian #include <stdint.h> 7209045adSStephane Eranian #include <jvmti.h> 8209045adSStephane Eranian 9209045adSStephane Eranian #if defined(__cplusplus) 10209045adSStephane Eranian extern "C" { 11209045adSStephane Eranian #endif 12209045adSStephane Eranian 13598b7c69SStephane Eranian typedef struct { 14598b7c69SStephane Eranian unsigned long pc; 15598b7c69SStephane Eranian int line_number; 16598b7c69SStephane Eranian int discrim; /* discriminator -- 0 for now */ 17598b7c69SStephane Eranian } jvmti_line_info_t; 18598b7c69SStephane Eranian 19209045adSStephane Eranian void *jvmti_open(void); 20209045adSStephane Eranian int jvmti_close(void *agent); 21209045adSStephane Eranian int jvmti_write_code(void *agent, char const *symbol_name, 22209045adSStephane Eranian uint64_t vma, void const *code, 23209045adSStephane Eranian const unsigned int code_size); 24598b7c69SStephane Eranian 25209045adSStephane Eranian int jvmti_write_debug_info(void *agent, 26209045adSStephane Eranian uint64_t code, 27209045adSStephane Eranian const char *file, 28598b7c69SStephane Eranian jvmti_line_info_t *li, 29598b7c69SStephane Eranian int nr_lines); 30209045adSStephane Eranian 31209045adSStephane Eranian #if defined(__cplusplus) 32209045adSStephane Eranian } 33209045adSStephane Eranian 34209045adSStephane Eranian #endif 35209045adSStephane Eranian #endif /* __JVMTI_H__ */ 36