< prev index next >

src/jdk.jdwp.agent/share/native/libjdwp/util.h

Print this page
rev 12879 : 8136556: Add the ability to perform static builds of MacOSX x64 binaries
Reviewed-by: ihse, bdelsart, gadams, lfoltan, rriggs, hseigel, twisti
   1 /*
   2  * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 259 #define SIGNATURE_END_CLASS     ';'
 260 
 261 /*
 262  * Modifier flags for classes, fields, methods
 263  */
 264 #define MOD_PUBLIC       0x0001     /* visible to everyone */
 265 #define MOD_PRIVATE      0x0002     /* visible only to the defining class */
 266 #define MOD_PROTECTED    0x0004     /* visible to subclasses */
 267 #define MOD_STATIC       0x0008     /* instance variable is static */
 268 #define MOD_FINAL        0x0010     /* no further subclassing, overriding */
 269 #define MOD_SYNCHRONIZED 0x0020     /* wrap method call in monitor lock */
 270 #define MOD_VOLATILE     0x0040     /* can cache in registers */
 271 #define MOD_TRANSIENT    0x0080     /* not persistant */
 272 #define MOD_NATIVE       0x0100     /* implemented in C */
 273 #define MOD_INTERFACE    0x0200     /* class is an interface */
 274 #define MOD_ABSTRACT     0x0400     /* no definition provided */
 275 /*
 276  * Additional modifiers not defined as such in the JVM spec
 277  */
 278 #define MOD_SYNTHETIC    0xf0000000  /* not in source code */
 279 
 280 /*
 281  * jlong conversion macros
 282  */
 283 #define jlong_zero       ((jlong) 0)
 284 #define jlong_one        ((jlong) 1)
 285 
 286 #define jlong_to_ptr(a)  ((void*)(intptr_t)(a))
 287 #define ptr_to_jlong(a)  ((jlong)(intptr_t)(a))
 288 #define jint_to_jlong(a) ((jlong)(a))
 289 #define jlong_to_jint(a) ((jint)(a))
 290 
 291 
 292 /*
 293  * util funcs
 294  */
 295 void util_initialize(JNIEnv *env);
 296 void util_reset(void);
 297 
 298 struct PacketInputStream;
 299 struct PacketOutputStream;
 300 
 301 jint uniqueID(void);
 302 jbyte referenceTypeTag(jclass clazz);
 303 jbyte specificTypeKey(JNIEnv *env, jobject object);
 304 jboolean isObjectTag(jbyte tag);
 305 jvmtiError spawnNewThread(jvmtiStartFunction func, void *arg, char *name);
 306 void convertSignatureToClassname(char *convert);
 307 void writeCodeLocation(struct PacketOutputStream *out, jclass clazz,
 308                        jmethodID method, jlocation location);
 309 
 310 jvmtiError classInstances(jclass klass, ObjectBatch *instances, int maxInstances);


   1 /*
   2  * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 259 #define SIGNATURE_END_CLASS     ';'
 260 
 261 /*
 262  * Modifier flags for classes, fields, methods
 263  */
 264 #define MOD_PUBLIC       0x0001     /* visible to everyone */
 265 #define MOD_PRIVATE      0x0002     /* visible only to the defining class */
 266 #define MOD_PROTECTED    0x0004     /* visible to subclasses */
 267 #define MOD_STATIC       0x0008     /* instance variable is static */
 268 #define MOD_FINAL        0x0010     /* no further subclassing, overriding */
 269 #define MOD_SYNCHRONIZED 0x0020     /* wrap method call in monitor lock */
 270 #define MOD_VOLATILE     0x0040     /* can cache in registers */
 271 #define MOD_TRANSIENT    0x0080     /* not persistant */
 272 #define MOD_NATIVE       0x0100     /* implemented in C */
 273 #define MOD_INTERFACE    0x0200     /* class is an interface */
 274 #define MOD_ABSTRACT     0x0400     /* no definition provided */
 275 /*
 276  * Additional modifiers not defined as such in the JVM spec
 277  */
 278 #define MOD_SYNTHETIC    0xf0000000  /* not in source code */












 279 
 280 /*
 281  * util funcs
 282  */
 283 void util_initialize(JNIEnv *env);
 284 void util_reset(void);
 285 
 286 struct PacketInputStream;
 287 struct PacketOutputStream;
 288 
 289 jint uniqueID(void);
 290 jbyte referenceTypeTag(jclass clazz);
 291 jbyte specificTypeKey(JNIEnv *env, jobject object);
 292 jboolean isObjectTag(jbyte tag);
 293 jvmtiError spawnNewThread(jvmtiStartFunction func, void *arg, char *name);
 294 void convertSignatureToClassname(char *convert);
 295 void writeCodeLocation(struct PacketOutputStream *out, jclass clazz,
 296                        jmethodID method, jlocation location);
 297 
 298 jvmtiError classInstances(jclass klass, ObjectBatch *instances, int maxInstances);


< prev index next >