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