/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef JDWP_UTIL_H
#define JDWP_UTIL_H
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#ifdef DEBUG
/* Just to make sure these interfaces are not used here. */
#endif
#include "log_messages.h"
#include "vm_interface.h"
#include "JDWP.h"
#include "util_md.h"
#include "error_messages.h"
#include "debugInit.h"
/* Get access to Native Platform Toolkit functions */
#include "npt.h"
/* Definition of a CommonRef tracked by the backend for the frontend */
typedef struct RefNode {
} RefNode;
/* Value of a NULL ID */
/*
* Globals used throughout the back end
*/
typedef struct {
/* Debug flags (bit mask) */
int debugflags;
/* Possible debug flags */
char * options;
/* Various property values we should grab on initialization */
unsigned log_flags;
/* The Native Platform Toolkit access */
/* Common References static data */
int objectsByIDsize;
int objectsByIDcount;
/* Indication that the agent has been loaded */
extern BackendGlobalData * gdata;
/*
* Event Index for handlers
*/
typedef enum {
} EventIndex;
/* Agent errors that might be in a jvmtiError for JDWP or internal.
* (Done this way so that compiler allows it's use as a jvmtiError)
*/
/* Combined event information */
typedef struct {
union {
/* ei = EI_FIELD_ACCESS */
struct {
} field_access;
/* ei = EI_FIELD_MODIFICATION */
struct {
char signature_type;
/* ei = EI_EXCEPTION */
struct {
} exception;
/* ei = EI_METHOD_EXIT */
struct {
} method_exit;
/* For monitor wait events */
union {
/* ei = EI_MONITOR_WAIT */
/* ei = EI_MONITOR_WAITED */
} monitor;
} u;
} EventInfo;
/* Structure to hold dynamic array of objects */
typedef struct ObjectBatch {
} ObjectBatch;
/*
* JNI signature constants, beyond those defined in JDWP_TAG(*)
*/
/*
* Modifier flags for classes, fields, methods
*/
/*
* Additional modifiers not defined as such in the JVM spec
*/
/*
* jlong conversion macros
*/
/*
* util funcs
*/
void util_reset(void);
struct PacketInputStream;
struct PacketOutputStream;
void convertSignatureToClassname(char *convert);
/*
* Command handling helpers shared among multiple command sets
*/
struct PacketOutputStream *out,
struct PacketOutputStream *out);
/*
* Thin wrappers on top of JNI
*/
/*
* Thin wrappers on top of JVMTI
*/
jint jvmtiMajorVersion(void);
jint jvmtiMinorVersion(void);
jint jvmtiMicroVersion(void);
char *getClassname(jclass);
void writeGenericSignature(struct PacketOutputStream *, char *);
void jvmtiDeallocate(void *buffer);
void eventIndexInit(void);
void log_debugee_location(const char *func,
/*
* Local Reference management. The two macros below are used
* throughout the back end whenever space for JNI local references
* is needed in the current frame.
*/
{ /* BEGINNING OF WITH SCOPE */
} /* END OF WITH SCOPE */
#endif