8224796: C code is not compiled correctly due to undefined "i386"
authorshade
Tue, 28 May 2019 21:31:07 +0200
changeset 55069 6e0786d8451b
parent 55068 f6260463dbe4
child 55070 d850d0f41c72
8224796: C code is not compiled correctly due to undefined "i386" Reviewed-by: dholmes, mikael
src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.c
src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.c	Tue May 28 20:47:47 2019 +0200
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.c	Tue May 28 21:31:07 2019 +0200
@@ -38,7 +38,11 @@
 #define amd64 1
 #endif
 
-#ifdef i386
+#if defined(i386) && !defined(i586)
+#define i586 1
+#endif
+
+#ifdef i586
 #include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
 #endif
 
@@ -386,7 +390,7 @@
   return (err == PS_OK)? array : 0;
 }
 
-#if defined(i386) || defined(amd64) || defined(sparc) || defined(sparcv9) | defined(ppc64) || defined(ppc64le) || defined(aarch64)
+#if defined(i586) || defined(amd64) || defined(sparc) || defined(sparcv9) | defined(ppc64) || defined(ppc64le) || defined(aarch64)
 JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
   (JNIEnv *env, jobject this_obj, jint lwp_id) {
 
@@ -402,7 +406,7 @@
   }
 
 #undef NPRGREG
-#ifdef i386
+#ifdef i586
 #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
 #endif
 #ifdef amd64
@@ -425,7 +429,7 @@
 
 #undef REG_INDEX
 
-#ifdef i386
+#ifdef i586
 #define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
 
   regs[REG_INDEX(GS)]  = (uintptr_t) gregs.xgs;
@@ -444,7 +448,7 @@
   regs[REG_INDEX(CS)]  = (uintptr_t) gregs.xcs;
   regs[REG_INDEX(SS)]  = (uintptr_t) gregs.xss;
 
-#endif /* i386 */
+#endif /* i586 */
 
 #ifdef amd64
 #define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg
--- a/src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c	Tue May 28 20:47:47 2019 +0200
+++ b/src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c	Tue May 28 21:31:07 2019 +0200
@@ -961,7 +961,7 @@
 
    if (is_debug()) {
       print_debug("integer regset\n");
-#ifdef i386
+#if defined(i586) || defined(i386)
       // print the regset
       print_debug("\teax = 0x%x\n", newthr->regs.r_eax);
       print_debug("\tebx = 0x%x\n", newthr->regs.r_ebx);