home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / breakpoints.h < prev    next >
C/C++ Source or Header  |  1998-09-15  |  2KB  |  79 lines

  1. /*
  2.  * @(#)breakpoints.h    1.3 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. /*
  16.  * Definitions for the breakpoints, single-step and debugger events
  17.  */
  18.  
  19. #ifndef _BREAKPOINTS_H_
  20. #define _BREAKPOINTS_H_
  21.  
  22. #include <stdio.h>
  23. #include <stdlib.h>
  24.  
  25. #include "bool.h"
  26. #include "jni.h"
  27. #include "interpreter.h"
  28. #include "threads.h"
  29.  
  30. /*
  31.  * This section for general use
  32.  */
  33.  
  34. extern int get_opcode(ExecEnv *ee, unsigned char *pc);
  35.  
  36. /*
  37.  * This section for use by a debugger 
  38.  */
  39.  
  40. #ifdef BREAKPTS
  41.  
  42. /* Typedefs for debugger-notification hooks */
  43. typedef void (*HandleSingleStepHook)(ExecEnv *ee, unsigned char *pc);
  44. typedef void (*HandleBreakpointHook)(ExecEnv *ee, unsigned char *pc);
  45. typedef void (*HandleExceptionHook)(ExecEnv *ee, unsigned char *pc,
  46.                 HObject *object);
  47.  
  48. JNIEXPORT void JNICALL
  49. set_debugger_hooks(HandleSingleStepHook hssh,
  50.            HandleBreakpointHook hbh,
  51.            HandleExceptionHook heh);
  52.  
  53. extern void set_single_step_thread(TID tid, bool_t shouldStep);
  54. extern bool_t set_breakpoint(ExecEnv *ee, unsigned char *pc);
  55. extern bool_t clear_breakpoint(ExecEnv *ee, unsigned char *pc);
  56. extern void clear_all_breakpoints(ExecEnv *ee);
  57.  
  58. extern bool_t JDB_loadclass_locked(ExecEnv *ee);
  59. extern HArrayOfObject *get_linked_classes();
  60.  
  61. #endif BREAKPTS
  62.  
  63. /*
  64.  * This section for use by the interpreter
  65.  */
  66. extern void notify_debugger_of_exception(unsigned char *pc, ExecEnv *ee, HObject *object);
  67. extern void notify_debugger_of_single_step(unsigned char *pc, ExecEnv *ee);
  68.  
  69. #ifdef BREAKPTS
  70. extern bool_t single_stepping; /* set ONLY by breakpoints.c */
  71. extern int get_breakpoint_opcode(ExecEnv *ee, unsigned char *pc, bool_t notify);
  72. extern bool_t set_breakpoint_opcode(ExecEnv *ee, unsigned char *pc, unsigned char opcode);
  73. #endif BREAKPTS
  74.  
  75.  
  76.  
  77.  
  78. #endif _BREAKPOINTS_H_ 
  79.