diff options
author | Keith Seitz <keiths@redhat.com> | 2006-10-14 20:11:12 +0000 |
---|---|---|
committer | Keith Seitz <kseitz@gcc.gnu.org> | 2006-10-14 20:11:12 +0000 |
commit | 0f546316f4ce2d2d224981b532d45a20332f0ed1 (patch) | |
tree | e1e9bbc74493dff5ebbd6ee844018c6a7cb62049 /libjava/include | |
parent | 1526c4b5b64e0271567425e10e3abeedfa088fe3 (diff) | |
download | gcc-0f546316f4ce2d2d224981b532d45a20332f0ed1.zip gcc-0f546316f4ce2d2d224981b532d45a20332f0ed1.tar.gz gcc-0f546316f4ce2d2d224981b532d45a20332f0ed1.tar.bz2 |
java-insns.h (enum java_code): Add op_breakpoint.
* include/java-insns.h (enum java_code): Add op_breakpoint.
* include/java-interp.h (_Jv_InterpMethod): Declare breakpoint_insn.
[INTERPRETER]: Declare _Jv_InterpMethod::bp_insn_slot.
[!INTERPRETER]: Declare _Jv_InterpMethod::bp_insn_opcode.
(install_break): Declare.
* interpret.cc (breakpoint_insn): Define breakpoint insn.
(compile): Add op_breakpoint to "can't happen" cases.
[INTERPRETER] Initialize breakpoint insn if necessary.
(install_break): New method.
* interpret-run.cc: Add op_breakpoint to insn_targets.
Add insn_breakpoint label.
* verify.cc (branch_prepass): Add op_breakpoint to unrecognized
opcodes section of switch statement.
(verify_instructions_0): Likewise.
From-SVN: r117734
Diffstat (limited to 'libjava/include')
-rw-r--r-- | libjava/include/java-insns.h | 6 | ||||
-rw-r--r-- | libjava/include/java-interp.h | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/libjava/include/java-insns.h b/libjava/include/java-insns.h index a065987..824e441 100644 --- a/libjava/include/java-insns.h +++ b/libjava/include/java-insns.h @@ -1,6 +1,6 @@ // java-insns.h - Instruction encodings. This is -*- c++ -*- -/* Copyright (C) 1999, 2001, 2002 Free Software Foundation +/* Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation This file is part of libgcj. @@ -199,9 +199,7 @@ enum java_opcode op_invokespecial = 0xb7, op_invokestatic = 0xb8, op_invokeinterface = 0xb9, - - // 0xba is unused. - + op_breakpoint = 0xba, op_new = 0xbb, op_newarray = 0xbc, op_anewarray = 0xbd, diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h index 276a887b..74846c9 100644 --- a/libjava/include/java-interp.h +++ b/libjava/include/java-interp.h @@ -133,6 +133,14 @@ struct _Jv_LineTableEntry class _Jv_InterpMethod : public _Jv_MethodBase { + // Breakpoint instruction + static pc_t breakpoint_insn; +#ifdef DIRECT_THREADED + static insn_slot bp_insn_slot; +#else + static unsigned char bp_insn_opcode; +#endif + _Jv_ushort max_stack; _Jv_ushort max_locals; int code_length; @@ -206,6 +214,10 @@ class _Jv_InterpMethod : public _Jv_MethodBase void get_line_table (jlong& start, jlong& end, jintArray& line_numbers, jlongArray& code_indices); + /* Installs a break instruction at the given code index. Returns + the pc_t of the breakpoint or NULL if index is invalid. */ + pc_t install_break (jlong index); + // Gets the instruction at the given index pc_t get_insn (jlong index); |