Commit 50ac2500 by Kyle Galloway

java-interp.h (_Jv_InterpMethod::run_debug): New method.

2006-08-15  Kyle Galloway  <kgallowa@redhat.com>

  * include/java-interp.h (_Jv_InterpMethod::run_debug): New method.
  * interpret.cc: Added placeholder for debug variable type info to STORE*
  macros.
  (_Jv_InterpMethod::run_debug): New method.
  (_Jv_InterpMethod::run_sync_object_debug): New method.
  (_Jv_InterpMethod::run_sync_class_debug): New method.
  (_Jv_InterpMethod::run_normal_debug): New method.
  (_Jv_InterpMethod::run_class_debug): New method.
  (_Jv_InterpMethod::ncode ()): Changed to select either debug or normal
  versions of these functions.
  * interpret-run.cc: New file, holds contents of old 	
  _Jv_InterpMethod::run method.
  * stacktrace.cc (_Jv_StackTrace::UnwindTraceFn): Changed to select
  appropriate function for debug or normal mode.

From-SVN: r116167
parent 4adb785d
...@@ -176,21 +176,31 @@ class _Jv_InterpMethod : public _Jv_MethodBase ...@@ -176,21 +176,31 @@ class _Jv_InterpMethod : public _Jv_MethodBase
static void run_synch_object (ffi_cif*, void*, ffi_raw*, void*); static void run_synch_object (ffi_cif*, void*, ffi_raw*, void*);
static void run_class (ffi_cif*, void*, ffi_raw*, void*); static void run_class (ffi_cif*, void*, ffi_raw*, void*);
static void run_synch_class (ffi_cif*, void*, ffi_raw*, void*); static void run_synch_class (ffi_cif*, void*, ffi_raw*, void*);
static void run_normal_debug (ffi_cif*, void*, ffi_raw*, void*);
static void run_synch_object_debug (ffi_cif*, void*, ffi_raw*, void*);
static void run_class_debug (ffi_cif*, void*, ffi_raw*, void*);
static void run_synch_class_debug (ffi_cif*, void*, ffi_raw*, void*);
static void run (void*, ffi_raw *, _Jv_InterpMethod *); static void run (void *, ffi_raw *, _Jv_InterpMethod *);
static void run_debug (void *, ffi_raw *, _Jv_InterpMethod *);
// Returns source file line number for given PC value, or -1 if line // Returns source file line number for given PC value, or -1 if line
// number info is unavailable. // number info is unavailable.
int get_source_line(pc_t mpc); int get_source_line(pc_t mpc);
#ifdef DIRECT_THREADED #ifdef DIRECT_THREADED
// Convenience function for indexing bytecode PC/insn slots in // Convenience function for indexing bytecode PC/insn slots in
// line tables for JDWP // line tables for JDWP
jlong insn_index (pc_t pc); jlong insn_index (pc_t pc);
#endif #endif
public: public:
/* Get the line table for this method. /* Get the line table for this method.
* start is the lowest index in the method * start is the lowest index in the method
* end is the highest index in the method * end is the highest index in the method
......
...@@ -24,6 +24,7 @@ details. */ ...@@ -24,6 +24,7 @@ details. */
#include <java/security/AccessController.h> #include <java/security/AccessController.h>
#include <java/util/ArrayList.h> #include <java/util/ArrayList.h>
#include <java/util/IdentityHashMap.h> #include <java/util/IdentityHashMap.h>
#include <gnu/classpath/jdwp/Jdwp.h>
#include <gnu/java/lang/MainThread.h> #include <gnu/java/lang/MainThread.h>
#include <gnu/gcj/runtime/NameFinder.h> #include <gnu/gcj/runtime/NameFinder.h>
#include <gnu/gcj/runtime/StringBuffer.h> #include <gnu/gcj/runtime/StringBuffer.h>
...@@ -113,7 +114,13 @@ _Jv_StackTrace::UnwindTraceFn (struct _Unwind_Context *context, void *state_ptr) ...@@ -113,7 +114,13 @@ _Jv_StackTrace::UnwindTraceFn (struct _Unwind_Context *context, void *state_ptr)
// correspondance between call frames in the interpreted stack and occurances // correspondance between call frames in the interpreted stack and occurances
// of _Jv_InterpMethod::run() on the native stack. // of _Jv_InterpMethod::run() on the native stack.
#ifdef INTERPRETER #ifdef INTERPRETER
void *interp_run = (void *) &_Jv_InterpMethod::run; void *interp_run = NULL;
if (::gnu::classpath::jdwp::Jdwp::isDebugging)
interp_run = (void *) &_Jv_InterpMethod::run_debug;
else
interp_run = (void *) &_Jv_InterpMethod::run;
if (func_addr == UNWRAP_FUNCTION_DESCRIPTOR (interp_run)) if (func_addr == UNWRAP_FUNCTION_DESCRIPTOR (interp_run))
{ {
state->frames[pos].type = frame_interpreter; state->frames[pos].type = frame_interpreter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment