18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __JVMTI_AGENT_H__ 38c2ecf20Sopenharmony_ci#define __JVMTI_AGENT_H__ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <sys/types.h> 68c2ecf20Sopenharmony_ci#include <stdint.h> 78c2ecf20Sopenharmony_ci#include <jvmti.h> 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#if defined(__cplusplus) 108c2ecf20Sopenharmony_ciextern "C" { 118c2ecf20Sopenharmony_ci#endif 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_citypedef struct { 148c2ecf20Sopenharmony_ci unsigned long pc; 158c2ecf20Sopenharmony_ci int line_number; 168c2ecf20Sopenharmony_ci int discrim; /* discriminator -- 0 for now */ 178c2ecf20Sopenharmony_ci jmethodID methodID; 188c2ecf20Sopenharmony_ci} jvmti_line_info_t; 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_civoid *jvmti_open(void); 218c2ecf20Sopenharmony_ciint jvmti_close(void *agent); 228c2ecf20Sopenharmony_ciint jvmti_write_code(void *agent, char const *symbol_name, 238c2ecf20Sopenharmony_ci uint64_t vma, void const *code, 248c2ecf20Sopenharmony_ci const unsigned int code_size); 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciint jvmti_write_debug_info(void *agent, uint64_t code, int nr_lines, 278c2ecf20Sopenharmony_ci jvmti_line_info_t *li, 288c2ecf20Sopenharmony_ci const char * const * file_names); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#if defined(__cplusplus) 318c2ecf20Sopenharmony_ci} 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#endif 348c2ecf20Sopenharmony_ci#endif /* __JVMTI_H__ */ 35