@@ -593,6 +593,48 @@ static bool addThreads(JNIEnv* env, jobject obj) {
593593
594594 // Program counter
595595 ptrRegs[REG_INDEX (RIP)] = context.Rip ;
596+
597+ #elif _M_ARM64
598+ #define REG_INDEX (x ) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##x
599+
600+ context.ContextFlags = CONTEXT_FULL;
601+ ptrIDebugAdvanced->GetThreadContext (&context, sizeof (CONTEXT));
602+
603+ ptrRegs[REG_INDEX (R0)] = context.X0 ;
604+ ptrRegs[REG_INDEX (R1)] = context.X1 ;
605+ ptrRegs[REG_INDEX (R2)] = context.X2 ;
606+ ptrRegs[REG_INDEX (R3)] = context.X3 ;
607+ ptrRegs[REG_INDEX (R4)] = context.X4 ;
608+ ptrRegs[REG_INDEX (R5)] = context.X5 ;
609+ ptrRegs[REG_INDEX (R6)] = context.X6 ;
610+ ptrRegs[REG_INDEX (R7)] = context.X7 ;
611+ ptrRegs[REG_INDEX (R8)] = context.X8 ;
612+ ptrRegs[REG_INDEX (R9)] = context.X9 ;
613+ ptrRegs[REG_INDEX (R10)] = context.X10 ;
614+ ptrRegs[REG_INDEX (R11)] = context.X11 ;
615+ ptrRegs[REG_INDEX (R12)] = context.X12 ;
616+ ptrRegs[REG_INDEX (R13)] = context.X13 ;
617+ ptrRegs[REG_INDEX (R14)] = context.X14 ;
618+ ptrRegs[REG_INDEX (R15)] = context.X15 ;
619+ ptrRegs[REG_INDEX (R16)] = context.X16 ;
620+ ptrRegs[REG_INDEX (R17)] = context.X17 ;
621+ ptrRegs[REG_INDEX (R18)] = context.X18 ;
622+ ptrRegs[REG_INDEX (R19)] = context.X19 ;
623+ ptrRegs[REG_INDEX (R20)] = context.X20 ;
624+ ptrRegs[REG_INDEX (R21)] = context.X21 ;
625+ ptrRegs[REG_INDEX (R22)] = context.X22 ;
626+ ptrRegs[REG_INDEX (R23)] = context.X23 ;
627+ ptrRegs[REG_INDEX (R24)] = context.X24 ;
628+ ptrRegs[REG_INDEX (R25)] = context.X25 ;
629+ ptrRegs[REG_INDEX (R26)] = context.X26 ;
630+ ptrRegs[REG_INDEX (R27)] = context.X27 ;
631+ ptrRegs[REG_INDEX (R28)] = context.X28 ;
632+
633+ ptrRegs[REG_INDEX (FP)] = context.Fp ;
634+ ptrRegs[REG_INDEX (LR)] = context.Lr ;
635+ ptrRegs[REG_INDEX (SP)] = context.Sp ;
636+ ptrRegs[REG_INDEX (PC)] = context.Pc ;
637+
596638#endif
597639
598640 env->ReleaseLongArrayElements (regs, ptrRegs, 0 );
0 commit comments