0N/A/*
1879N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#ifndef OS_SOLARIS_DTRACE_LIBJVM_DB_H
1879N/A#define OS_SOLARIS_DTRACE_LIBJVM_DB_H
1879N/A
0N/A#include <proc_service.h>
0N/A
0N/A#ifdef __cplusplus
0N/Aextern "C" {
0N/A#endif
0N/A
0N/Atypedef struct jvm_agent jvm_agent_t;
0N/A
0N/A#define JVM_DB_VERSION 1
0N/A
0N/Ajvm_agent_t *Jagent_create(struct ps_prochandle *P, int vers);
0N/A
0N/A/*
0N/A * Called from Jframe_iter() for each java frame. If it returns 0, then
0N/A * Jframe_iter() proceeds to the next frame. Otherwise, the return value is
0N/A * immediately returned to the caller of Jframe_iter().
0N/A *
0N/A * Parameters:
0N/A * 'cld' is client supplied data (to maintain iterator state, if any).
0N/A * 'name' is java method name.
0N/A * 'bci' is byte code index. it will be -1 if not available.
0N/A * 'line' is java source line number. it will be 0 if not available.
0N/A * 'handle' is an abstract client handle, reserved for future expansions
0N/A */
0N/A
0N/Atypedef int java_stack_f(void *cld, const prgregset_t regs, const char* name, int bci, int line, void *handle);
0N/A
0N/A/*
0N/A * Iterates over the java frames at the current location. Returns -1 if no java
0N/A * frames were found, or if there was some unrecoverable error. Otherwise,
0N/A * returns the last value returned from 'func'.
0N/A */
0N/Aint Jframe_iter(jvm_agent_t *agent, prgregset_t gregs, java_stack_f *func, void* cld);
0N/A
0N/Avoid Jagent_destroy(jvm_agent_t *J);
0N/A
0N/A#ifdef __cplusplus
0N/A} /* extern "C" */
0N/A#endif /* __cplusplus */
1879N/A
1879N/A#endif // OS_SOLARIS_DTRACE_LIBJVM_DB_H