< prev index next >

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

Print this page




  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
  23  * questions.
  24  */
  25 
  26 #ifndef JDWP_UTIL_H
  27 #define JDWP_UTIL_H
  28 
  29 #include <stddef.h>
  30 #include <stdio.h>
  31 #include <string.h>
  32 #include <stdlib.h>
  33 #include <stdarg.h>
  34 
  35 #ifdef DEBUG
  36     /* Just to make sure these interfaces are not used here. */
  37     #undef free
  38     #define free(p) Do not use this interface.
  39     #undef malloc
  40     #define malloc(p) Do not use this interface.
  41     #undef calloc
  42     #define calloc(p) Do not use this interface.
  43     #undef realloc
  44     #define realloc(p) Do not use this interface.
  45     #undef strdup
  46     #define strdup(p) Do not use this interface.
  47 #endif
  48 
  49 #include "log_messages.h"
  50 #include "vm_interface.h"
  51 #include "JDWP.h"
  52 #include "util_md.h"
  53 #include "error_messages.h"
  54 #include "debugInit.h"
  55 
  56 /* Definition of a CommonRef tracked by the backend for the frontend */
  57 typedef struct RefNode {
  58     jlong        seqNum;        /* ID of reference, also key for hash table */
  59     jobject      ref;           /* could be strong or weak */
  60     struct RefNode *next;       /* next RefNode* in bucket chain */
  61     jint         count;         /* count of references */
  62     unsigned     isStrong : 1;  /* 1 means this is a string reference */
  63 } RefNode;
  64 
  65 /* Value of a NULL ID */
  66 #define NULL_OBJECT_ID  ((jlong)0)




  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
  23  * questions.
  24  */
  25 
  26 #ifndef JDWP_UTIL_H
  27 #define JDWP_UTIL_H
  28 
  29 #include <stddef.h>
  30 #include <stdio.h>
  31 #include <string.h>
  32 #include <stdlib.h>
  33 #include <stdarg.h>
  34 
  35 #ifdef DEBUG
  36     /* Just to make sure these interfaces are not used here. */
  37     #undef free
  38     #define free do_not_use_this_interface_free
  39     #undef malloc
  40     #define malloc do_not_use_this_interface_malloc
  41     #undef calloc
  42     #define calloc do_not_use_this_interface_calloc
  43     #undef realloc
  44     #define realloc do_not_use_this_interface_realloc
  45     #undef strdup
  46     #define strdup do_not_use_this_interface_strdup
  47 #endif
  48 
  49 #include "log_messages.h"
  50 #include "vm_interface.h"
  51 #include "JDWP.h"
  52 #include "util_md.h"
  53 #include "error_messages.h"
  54 #include "debugInit.h"
  55 
  56 /* Definition of a CommonRef tracked by the backend for the frontend */
  57 typedef struct RefNode {
  58     jlong        seqNum;        /* ID of reference, also key for hash table */
  59     jobject      ref;           /* could be strong or weak */
  60     struct RefNode *next;       /* next RefNode* in bucket chain */
  61     jint         count;         /* count of references */
  62     unsigned     isStrong : 1;  /* 1 means this is a string reference */
  63 } RefNode;
  64 
  65 /* Value of a NULL ID */
  66 #define NULL_OBJECT_ID  ((jlong)0)


< prev index next >