/*
* Exception handling.
*/
-#ifndef _DALVIK_EXCEPTION
-#define _DALVIK_EXCEPTION
+#ifndef DALVIK_EXCEPTION_H_
+#define DALVIK_EXCEPTION_H_
/*
* Create a Throwable and throw an exception in the current thread (where
* "*newFrame" gets a copy of the new frame pointer.
*
* If "doUnroll" is set, we unroll "thread"s stack as we go (and update
- * self->curFrame with the same value as in *newFrame).
+ * self->interpSave.curFrame with the same value as in *newFrame).
*
* Returns the offset to the catch code on success, or -1 if we couldn't
* find a catcher.
*/
-int dvmFindCatchBlock(Thread* self, int relPc, Object* exception,
+extern "C" int dvmFindCatchBlock(Thread* self, int relPc, Object* exception,
bool doUnroll, void** newFrame);
/*
* Throw an ArithmeticException in the current thread, with the given detail
* message.
*/
-void dvmThrowArithmeticException(const char* msg);
+extern "C" void dvmThrowArithmeticException(const char* msg);
/*
* Throw an ArrayIndexOutOfBoundsException in the current thread,
* using the given array length and index in the detail message.
*/
-void dvmThrowArrayIndexOutOfBoundsException(int length, int index);
+extern "C" void dvmThrowArrayIndexOutOfBoundsException(int length, int index);
/*
* Throw an ArrayStoreException in the current thread, using the given classes'
* names in the detail message, indicating that an object of the given type
* can't be stored into an array of the given type.
*/
-void dvmThrowArrayStoreExceptionIncompatibleElement(ClassObject* objectType,
- ClassObject* arrayType);
+extern "C" void dvmThrowArrayStoreExceptionIncompatibleElement(ClassObject* objectType, ClassObject* arrayType);
/*
* Throw an ArrayStoreException in the current thread, using the given
* Throw a ClassCastException in the current thread, using the given classes'
* names in the detail message.
*/
-void dvmThrowClassCastException(ClassObject* actual, ClassObject* desired);
+extern "C" void dvmThrowClassCastException(ClassObject* actual, ClassObject* desired);
/**
* Throw a ClassCircularityError in the current thread, with the
* Throw an InternalError in the current thread, with the given
* detail message.
*/
-void dvmThrowInternalError(const char* msg);
+extern "C" void dvmThrowInternalError(const char* msg);
/**
* Throw an InterruptedException in the current thread, with the given
* Throw a NegativeArraySizeException in the current thread, with the
* given number as the detail message.
*/
-void dvmThrowNegativeArraySizeException(s4 size);
+extern "C" void dvmThrowNegativeArraySizeException(s4 size);
/**
* Throw a NoClassDefFoundError in the current thread, with the
* human-readable form of the given descriptor as the detail message.
*/
-void dvmThrowNoClassDefFoundError(const char* descriptor);
+extern "C" void dvmThrowNoClassDefFoundError(const char* descriptor);
/**
* Throw a NoClassDefFoundError in the current thread, with the given
* Throw a NoSuchFieldError in the current thread, with the given
* detail message.
*/
-void dvmThrowNoSuchFieldError(const char* msg);
+extern "C" void dvmThrowNoSuchFieldError(const char* msg);
/**
* Throw a NoSuchFieldException in the current thread, with the given
* Throw a NoSuchMethodError in the current thread, with the given
* detail message.
*/
-void dvmThrowNoSuchMethodError(const char* msg);
+extern "C" void dvmThrowNoSuchMethodError(const char* msg);
/**
* Throw a NullPointerException in the current thread, with the given
* detail message.
*/
-void dvmThrowNullPointerException(const char* msg);
+extern "C" void dvmThrowNullPointerException(const char* msg);
/**
* Throw an OutOfMemoryError in the current thread, with the given
* the given detail message.
*/
void dvmThrowUnsatisfiedLinkError(const char* msg);
+void dvmThrowUnsatisfiedLinkError(const char* msg, const Method* method);
/**
* Throw an UnsupportedOperationException in the current thread, with
*/
void dvmThrowVirtualMachineError(const char* msg);
-#endif /*_DALVIK_EXCEPTION*/
+#endif // DALVIK_EXCEPTION_H_