< prev index next >

agent/src/os/linux/LinuxDebuggerLocal.c

Print this page

        

*** 47,56 **** --- 47,60 ---- #if defined(sparc) || defined(sparcv9) #include "sun_jvm_hotspot_debugger_sparc_SPARCThreadContext.h" #endif + #ifdef aarch64 + #include "sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext.h" + #endif + static jfieldID p_ps_prochandle_ID = 0; static jfieldID threadList_ID = 0; static jfieldID loadObjectList_ID = 0; static jmethodID createClosestSymbol_ID = 0;
*** 331,341 **** err = ps_pdread(get_proc_handle(env, this_obj), (psaddr_t) (uintptr_t)addr, bufPtr, numBytes); (*env)->ReleaseByteArrayElements(env, array, bufPtr, 0); return (err == PS_OK)? array : 0; } ! #if defined(i386) || defined(amd64) || defined(sparc) || defined(sparcv9) JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0 (JNIEnv *env, jobject this_obj, jint lwp_id) { struct user_regs_struct gregs; jboolean isCopy; --- 335,345 ---- err = ps_pdread(get_proc_handle(env, this_obj), (psaddr_t) (uintptr_t)addr, bufPtr, numBytes); (*env)->ReleaseByteArrayElements(env, array, bufPtr, 0); return (err == PS_OK)? array : 0; } ! #if defined(i386) || defined(amd64) || defined(sparc) || defined(sparcv9) || defined(aarch64) JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0 (JNIEnv *env, jobject this_obj, jint lwp_id) { struct user_regs_struct gregs; jboolean isCopy;
*** 353,362 **** --- 357,369 ---- #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG #endif #ifdef amd64 #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG #endif + #ifdef aarch64 + #define NPRGREG sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_NPRGREG + #endif #if defined(sparc) || defined(sparcv9) #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG #endif array = (*env)->NewLongArray(env, NPRGREG);
*** 448,457 **** --- 455,477 ---- regs[REG_INDEX(R_O5)] = gregs.u_regs[12]; regs[REG_INDEX(R_O6)] = gregs.u_regs[13]; regs[REG_INDEX(R_O7)] = gregs.u_regs[14]; #endif /* sparc */ + #if defined(aarch64) + + #define REG_INDEX(reg) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##reg + + { + int i; + for (i = 0; i < 31; i++) + regs[i] = gregs.regs[i]; + regs[REG_INDEX(SP)] = gregs.sp; + regs[REG_INDEX(PC)] = gregs.pc; + } + #endif /* aarch64 */ + (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT); return array; } #endif
< prev index next >