diff options
author | Keith Seitz <keiths@redhat.com> | 2007-04-24 18:18:56 +0000 |
---|---|---|
committer | Keith Seitz <kseitz@gcc.gnu.org> | 2007-04-24 18:18:56 +0000 |
commit | 9872ecadbd94fa67562ed7ff6825250b122aae62 (patch) | |
tree | abee94b0b7a0cb00f3aa1d59f96ec58c46c6bd9a /libjava/gnu | |
parent | 676b23ba25b9f21507847fe1f7a90266aaa2e81f (diff) | |
download | gcc-9872ecadbd94fa67562ed7ff6825250b122aae62.zip gcc-9872ecadbd94fa67562ed7ff6825250b122aae62.tar.gz gcc-9872ecadbd94fa67562ed7ff6825250b122aae62.tar.bz2 |
headers.txt (gnu/gcj/jvmti/Breakpoint.h): Add _Jv_RewriteBreakpointInsn friend declaration.
* headers.txt (gnu/gcj/jvmti/Breakpoint.h)[DIRECT_THREADED]:
Add _Jv_RewriteBreakpointInsn friend declaration.
* gnu/gcj/jvmti/natBreakpoint.cc (_Jv_RewriteBreakpointInsn)
[DIRECT_THREADED]: New function.
* gnu/gcj/jvmti/Breakpoint.h: Regenerate.
* interpret-run.cc: Define new REWRITE_INSN macro.
Changed all occurrences of insn rewriting to call REWRITE_INSN.
From-SVN: r124111
Diffstat (limited to 'libjava/gnu')
-rw-r--r-- | libjava/gnu/gcj/jvmti/Breakpoint.h | 8 | ||||
-rw-r--r-- | libjava/gnu/gcj/jvmti/natBreakpoint.cc | 16 |
2 files changed, 24 insertions, 0 deletions
diff --git a/libjava/gnu/gcj/jvmti/Breakpoint.h b/libjava/gnu/gcj/jvmti/Breakpoint.h index ebdd855..b522c77 100644 --- a/libjava/gnu/gcj/jvmti/Breakpoint.h +++ b/libjava/gnu/gcj/jvmti/Breakpoint.h @@ -22,9 +22,17 @@ extern "Java" } } +#ifdef DIRECT_THREADED +void _Jv_RewriteBreakpointInsn (jmethodID, jlocation, pc_t); +#endif + class gnu::gcj::jvmti::Breakpoint : public ::java::lang::Object { +#ifdef DIRECT_THREADED +friend void (::_Jv_RewriteBreakpointInsn (jmethodID, jlocation, pc_t)); +#endif + public: Breakpoint(jlong, jlong); private: diff --git a/libjava/gnu/gcj/jvmti/natBreakpoint.cc b/libjava/gnu/gcj/jvmti/natBreakpoint.cc index 2a85a93..5dbd3f8 100644 --- a/libjava/gnu/gcj/jvmti/natBreakpoint.cc +++ b/libjava/gnu/gcj/jvmti/natBreakpoint.cc @@ -17,6 +17,7 @@ details. */ #include <jvmti.h> #include <gnu/gcj/jvmti/Breakpoint.h> +#include <gnu/gcj/jvmti/BreakpointManager.h> static _Jv_InterpMethod * get_interp_method (jlong method) @@ -54,3 +55,18 @@ gnu::gcj::jvmti::Breakpoint::remove () _Jv_InterpMethod *imeth = get_interp_method (method); imeth->set_insn (location, reinterpret_cast<pc_t> (data)); } + +#ifdef DIRECT_THREADED +void +_Jv_RewriteBreakpointInsn (jmethodID mid, jlocation loc, pc_t new_insn) +{ + using namespace ::gnu::gcj::jvmti; + Breakpoint *bp + = BreakpointManager::getBreakpoint (reinterpret_cast<jlong> (mid), loc); + if (bp != NULL) + { + pc_t old_insn = (pc_t) bp->data; + old_insn->insn = new_insn; + } +} +#endif // DIRECT_THREADED |