This commit is contained in:
Coleen Phillimore 2014-08-28 11:30:11 -04:00
commit 49d21c007b
2 changed files with 11 additions and 10 deletions

View File

@ -90,7 +90,9 @@ struct DebuggerWith2Objects : DebuggerWithObject {
*/
static void throwNewDebuggerException(JNIEnv* env, const char* errMsg) {
env->ThrowNew(env->FindClass("sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
jclass clazz = env->FindClass("sun/jvm/hotspot/debugger/DebuggerException");
CHECK_EXCEPTION;
env->ThrowNew(clazz, errMsg);
}
// JNI ids for some fields, methods
@ -962,6 +964,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLoca
CHECK_EXCEPTION_(0);
jboolean isCopy;
jlong* ptr = env->GetLongArrayElements(res, &isCopy);
CHECK_EXCEPTION_(NULL);
for (int i = 0; i < NPRGREG; i++) {
ptr[i] = (jlong) (uintptr_t) gregs[i];
}
@ -1253,6 +1256,7 @@ JNIEXPORT jstring JNICALL Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_d
(JNIEnv *env, jobject this_object, jstring name) {
jboolean isCopy;
const char* ptr = env->GetStringUTFChars(name, &isCopy);
CHECK_EXCEPTION_(NULL);
char buf[2*SYMBOL_BUF_SIZE + 1];
jstring res = 0;
if (cplus_demangle((char*) ptr, buf, sizeof(buf)) != DEMANGLE_ESPACE) {
@ -1439,7 +1443,9 @@ JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_init
"createClosestSymbol", "(Ljava/lang/String;J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;");
CHECK_EXCEPTION;
listAdd_ID = env->GetMethodID(env->FindClass("java/util/List"), "add", "(Ljava/lang/Object;)Z");
jclass list_clazz = env->FindClass("java/util/List");
CHECK_EXCEPTION;
listAdd_ID = env->GetMethodID(list_clazz, "add", "(Ljava/lang/Object;)Z");
CHECK_EXCEPTION;
// part of the class sharing workaround

View File

@ -1678,14 +1678,9 @@ void os::print_dll_info(outputStream *st) {
dlclose(handle);
#elif defined(__APPLE__)
uint32_t count;
uint32_t i;
count = _dyld_image_count();
for (i = 1; i < count; i++) {
const char *name = _dyld_get_image_name(i);
intptr_t slide = _dyld_get_image_vmaddr_slide(i);
st->print_cr(PTR_FORMAT " \t%s", slide, name);
for (uint32_t i = 1; i < _dyld_image_count(); i++) {
st->print_cr(PTR_FORMAT " \t%s", _dyld_get_image_header(i),
_dyld_get_image_name(i));
}
#else
st->print_cr("Error: Cannot print dynamic libraries.");