//! create a new instance of the class
StageDataTransitPtr StageDataBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
TableDOMEventDetailsTransitPtr TableDOMEventDetailsBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
HDRStageTransitPtr HDRStageBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMPassiveWinClearOpTransitPtr CSMPassiveWinClearOpBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMDrawManagerTransitPtr CSMDrawManagerBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
SearchWindowEventDetailsTransitPtr SearchWindowEventDetailsBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
KeySensorTransitPtr KeySensorBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMClusterWinOptionsTransitPtr CSMClusterWinOptionsBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMViewportTransitPtr CSMViewportBase::create(void)
{
    return createLocal();
}
Esempio n. 10
0
jobject createFrame(JNIEnv *env, jobject tools, jthread thread, jint totalDepth,
		    jint depth, jboolean live, jmethodID method,
		    jlocation location, jboolean get_locals) {
  jvmtiError tiErr;
  jvmtiLocalVariableEntry *locals;
  jint count;
  jint i;
  jboolean isStatic;
  jboolean isNative;
  jobjectArray variables;
  jobjectArray lvars;
  jobject var;
  jobject this;
  jobject frame;
  jclass declaringClass;
  jobject reflectedMethod;

  lvars = NULL; // initialize

  tiErr = JVMTI(IsMethodNative, method, &isNative);
  if (tiErr != JVMTI_ERROR_NONE) {
    throwJvmtiException(env, "IsMethodNative", tiErr);
    return NULL;
  }

  if (get_locals && !isNative) {
    tiErr = JVMTI(GetLocalVariableTable, method, &count, &locals);
    if (tiErr == JVMTI_ERROR_ABSENT_INFORMATION) {
      count = 0;
      locals = NULL;
    } else if (tiErr != JVMTI_ERROR_NONE) {
      throwJvmtiException(env, "GetLocalVariableTable", tiErr);
      return NULL;
    }
    variables = (*env)->NewObjectArray(env, count, agent->LocalVariable, NULL);
    if (!variables || (*env)->ExceptionCheck(env)) return NULL;
    for (i = 0; i < count; i++) {
      var = createLocal(env, tools, locals[i]);
      if (!var) {
	JVMTI(Deallocate, (void*)locals);
	// don't care about the error from Deallocate, there is an error already
	return NULL;
      }
      (*env)->SetObjectArrayElement(env, variables, i, var);
      (*env)->DeleteLocalRef(env, var);
    }

    if (!live) {
      lvars = getAllLocals(env, thread, depth, location, count, locals);
      if (!lvars) {
	JVMTI(Deallocate, (void*)locals);
	// don't care about the error from Deallocate, there is an error already
	return NULL;
      }
    }
    tiErr = JVMTI(Deallocate, (void*)locals);
    if (tiErr != JVMTI_ERROR_NONE) {
      throwJvmtiException(env, "Deallocate:GetLocalVariableTable", tiErr);
      return NULL;
    }
    
  } else {
    variables = (*env)->NewObjectArray(env, 0, agent->LocalVariable, NULL);
    if (!variables || (*env)->ExceptionCheck(env)) return NULL;
    lvars = variables; // use the same empty array for the detached locals
  }

  tiErr = JVMTI(GetMethodModifiers, method, &i);
  if (tiErr != JVMTI_ERROR_NONE) {
    throwJvmtiException(env, "GetMethodModifiers", tiErr);
    return NULL;
  }
  isStatic = (i & MOD_STATIC) != 0;

  tiErr = JVMTI_ERROR_NONE;
  if (get_locals) {
#ifdef __JVMTI_VERSION_1_2
    tiErr = JVMTI(GetLocalInstance, thread, depth, &this);
#else
    if (isStatic) {
      this = NULL;
    } else {
      tiErr = JVMTI(GetLocalObject, thread, depth, 0, &this);
    }
#endif
  } else {
    this = NULL;
  }
  if (tiErr != JVMTI_ERROR_NONE) {
    throwJvmtiException(env, "GetLocalInstance", tiErr);
    return NULL;
  }

  tiErr = JVMTI(GetMethodDeclaringClass, method, &declaringClass);
  if (tiErr != JVMTI_ERROR_NONE) {
    throwJvmtiException(env, "GetMethodDeclaringClass", tiErr);
    (*env)->DeleteLocalRef(env, variables);
    return NULL;
  }

  reflectedMethod = (*env)->ToReflectedMethod(env, declaringClass, method, isStatic);
  (*env)->DeleteLocalRef(env, declaringClass);
  if (!reflectedMethod) {
    (*env)->DeleteLocalRef(env, variables);
    return NULL;
  }

  frame = (*env)->CallObjectMethod(env, tools, agent->createFrame,
				   thread, reflectedMethod, totalDepth-depth,
				   this, location, variables, lvars);
  (*env)->DeleteLocalRef(env, reflectedMethod);
  (*env)->DeleteLocalRef(env, variables);
  if (this) (*env)->DeleteLocalRef(env, this);
  if ((*env)->ExceptionCheck(env)) return NULL;
  return frame;
}
//! create a new instance of the class
InterfaceOptionsTransitPtr InterfaceOptionsBase::create(void)
{
    return createLocal();
}
Esempio n. 12
0
//! create a new instance of the class
CSMGLUTWindowTransitPtr CSMGLUTWindowBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
FrameHandlerTransitPtr FrameHandlerBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMClusterWindowTransitPtr CSMClusterWindowBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
ConnectorAttachmentTransitPtr ConnectorAttachmentBase::create(void)
{
    return createLocal();
}
Esempio n. 16
0
//! create a new instance of the class
LinuxEventOptionsTransitPtr LinuxEventOptionsBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMNativeWindowTransitPtr CSMNativeWindowBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMTrackballTransitPtr CSMTrackballBase::create(void)
{
    return createLocal();
}
Esempio n. 19
0
//! create a new instance of the class
VCViewareaTransitPtr VCViewareaBase::create(void)
{
    return createLocal();
}
Esempio n. 20
0
//! create a new instance of the class
VideoEventTransitPtr VideoEventBase::create(void)
{
    return createLocal();
}
Esempio n. 21
0
//! create a new instance of the class
CSMLoggerTransitPtr CSMLoggerBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMSceneParameterTransitPtr CSMSceneParameterBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CubeMapGeneratorStageDataTransitPtr CubeMapGeneratorStageDataBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CounterTransitPtr CounterBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
DynamicStateGeneratorStageDataTransitPtr DynamicStateGeneratorStageDataBase::create(void)
{
    return createLocal();
}
//! create a new instance of the class
CSMStatisticsForegroundTransitPtr CSMStatisticsForegroundBase::create(void)
{
    return createLocal();
}