home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / j2sdk / files / linux / j2sdklin.bin / jdk1.3.1 / include-old / breakpoints.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-05-06  |  3.0 KB  |  79 lines

  1. /*
  2.  * @(#)breakpoints.h    1.19 00/02/02
  3.  *
  4.  * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the proprietary information of Sun Microsystems, Inc.  
  7.  * Use is subject to license terms.
  8.  * 
  9.  */
  10.  
  11. /*
  12.  * Definitions for the debugger events and operations.
  13.  * Only for use when BREAKPTS is defined.
  14.  */
  15.  
  16. #ifndef _JAVASOFT_BREAKPOINTS_H_
  17. #define _JAVASOFT_BREAKPOINTS_H_
  18.  
  19. #ifdef BREAKPTS
  20.  
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23.  
  24. #include "bool.h"
  25. #include "jni.h"
  26. #include "interpreter.h"
  27. #include "threads.h"
  28.  
  29. #define FRAME_POP_SENTINEL ((unsigned char *)1)
  30.  
  31. /* Typedefs for debugger-notification hooks */
  32. typedef void (*HandleSingleStepHook)(ExecEnv *ee, unsigned char *pc);
  33. typedef void (*HandleBreakpointHook)(ExecEnv *ee, unsigned char *pc);
  34. typedef void (*HandleExceptionHook)(ExecEnv *ee, unsigned char *pc,
  35.                                     HObject *object);
  36.  
  37. extern void set_debugger_hooks(HandleSingleStepHook hssh,
  38.                                HandleBreakpointHook hbh,
  39.                                HandleExceptionHook heh);
  40.  
  41. extern void set_single_step_thread(TID tid, bool_t shouldStep);
  42. extern bool_t clear_breakpoint(ExecEnv *ee, unsigned char *pc);
  43.  
  44.  
  45. /*
  46.  * This section for use by the interpreter
  47.  */
  48. extern void notify_debugger_of_exception(ExecEnv *ee, unsigned char *pc,
  49.                                          HObject *object);
  50. extern void notify_debugger_of_exception_catch(ExecEnv *ee,
  51.                                                unsigned char *pc,
  52.                                                HObject *object);
  53. extern void notify_debugger_of_single_step(ExecEnv *ee, unsigned char *pc);
  54. extern void notify_debugger_of_field_access(ExecEnv *ee, JHandle *obj, 
  55.                                             struct fieldblock *fb);
  56. extern void notify_debugger_of_field_modification(ExecEnv *ee, JHandle *obj,
  57.                                                   struct fieldblock *fb,
  58.                                                   jvalue jval);
  59. extern void notify_debugger_of_thread_start(ExecEnv *ee, JHandle *thread);
  60. extern void notify_debugger_of_thread_end(ExecEnv *ee, JHandle *thread);
  61. extern void notify_debugger_of_frame_push(ExecEnv *ee);
  62. extern void notify_debugger_of_frame_pop(ExecEnv *ee);
  63. extern void notify_debugger_of_class_load(ExecEnv *ee, JHandle *clazz);
  64. extern void notify_debugger_of_class_prepare(ExecEnv *ee, JHandle *clazz);
  65. extern void notify_debugger_of_class_unload(ExecEnv *ee, JHandle *clazz);
  66. extern void notify_debugger_of_vm_init(ExecEnv *ee);
  67.  
  68. extern bool_t single_stepping; /* set ONLY by jvmdi.c */
  69. extern bool_t watching_field_access; /* set ONLY by jvmdi.c */
  70. extern bool_t watching_field_modification; /* set ONLY by jvmdi.c */
  71.  
  72. extern int get_breakpoint_opcode(ExecEnv *ee, unsigned char *pc, 
  73.                                  bool_t notify);
  74. extern bool_t set_breakpoint_opcode(ExecEnv *ee, unsigned char *pc, 
  75.                                  unsigned char opcode);
  76. #endif /* BREAKPTS */
  77.  
  78. #endif /* !_JAVASOFT_BREAKPOINTS_H_ */
  79.