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
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user