blob: bedf5d0ba9ff928ec79f450a170328775a48d37d [file] [log] [blame]
Stephane Eranian209045a2015-11-30 10:02:22 +01001#ifndef __JVMTI_AGENT_H__
2#define __JVMTI_AGENT_H__
3
4#include <sys/types.h>
5#include <stdint.h>
6#include <jvmti.h>
7
8#define __unused __attribute__((unused))
9
10#if defined(__cplusplus)
11extern "C" {
12#endif
13
Stephane Eranian598b7c62015-11-30 10:02:23 +010014typedef struct {
15 unsigned long pc;
16 int line_number;
17 int discrim; /* discriminator -- 0 for now */
18} jvmti_line_info_t;
19
Stephane Eranian209045a2015-11-30 10:02:22 +010020void *jvmti_open(void);
21int jvmti_close(void *agent);
22int jvmti_write_code(void *agent, char const *symbol_name,
23 uint64_t vma, void const *code,
24 const unsigned int code_size);
Stephane Eranian598b7c62015-11-30 10:02:23 +010025
Stephane Eranian209045a2015-11-30 10:02:22 +010026int jvmti_write_debug_info(void *agent,
27 uint64_t code,
28 const char *file,
Stephane Eranian598b7c62015-11-30 10:02:23 +010029 jvmti_line_info_t *li,
30 int nr_lines);
Stephane Eranian209045a2015-11-30 10:02:22 +010031
32#if defined(__cplusplus)
33}
34
35#endif
36#endif /* __JVMTI_H__ */