harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r601325 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/jvmti_break_intf.h src/jvmti/jvmti_break_intf.cpp src/util/win/em64t/exception_handlers.asm
Date Wed, 05 Dec 2007 13:07:25 GMT
Author: gshimansky
Date: Wed Dec  5 05:07:23 2007
New Revision: 601325

URL: http://svn.apache.org/viewvc?rev=601325&view=rev
Log:
JVMTI breakpoints have to clear direction flag in CPU on windows x86_64
as it is done on x86. This is necessary to make all inlined memcpy
operations to work correctly, otherwise they may corrupt stack especially
in release mode.


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_break_intf.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/exception_handlers.asm

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_break_intf.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_break_intf.h?rev=601325&r1=601324&r2=601325&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_break_intf.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_break_intf.h Wed Dec  5 05:07:23
2007
@@ -231,7 +231,7 @@
 };
 
 // Address of this function is used for stack unwinding througn breakpoint
-void __cdecl process_native_breakpoint_event();
+extern "C" void __cdecl process_native_breakpoint_event();
 
 // Callback function for native breakpoint processing
 bool jvmti_jit_breakpoint_handler(Registers *regs);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp?rev=601325&r1=601324&r2=601325&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp Wed Dec  5 05:07:23
2007
@@ -1350,7 +1350,10 @@
     ti->vm_brpt->process_native_breakpoint();
 }
 
-#if defined (_WIN32) && !defined(_EM64T_)
+#if defined (_WIN32)
+#if defined(_EM64T_)
+extern "C" void asm_process_native_breakpoint_event();
+#else
 static void __declspec(naked)
 asm_process_native_breakpoint_event()
 {
@@ -1365,6 +1368,7 @@
     ret
     }
 }
+#endif
 #endif // _WIN32
 
 bool jvmti_jit_breakpoint_handler(Registers *regs)
@@ -1422,7 +1426,7 @@
     // Copy original registers to TLS
     vm_set_jvmti_saved_exception_registers(vm_thread, *regs);
     // Set return address for exception handler
-#if defined (PLATFORM_POSIX) || defined(_EM64T_)
+#if defined (PLATFORM_POSIX)
     regs->set_ip((void*)process_native_breakpoint_event);
 #else // PLATFORM_POSIX
     regs->set_ip((void*)asm_process_native_breakpoint_event);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/exception_handlers.asm
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/exception_handlers.asm?rev=601325&r1=601324&r2=601325&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/exception_handlers.asm (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/exception_handlers.asm Wed Dec
 5 05:07:23 2007
@@ -4,6 +4,9 @@
 PUBLIC  asm_c_exception_handler
 EXTRN   c_exception_handler:PROC
 
+PUBLIC  asm_process_native_breakpoint_event
+EXTRN   process_native_breakpoint_event:PROC
+
 _TEXT   SEGMENT
 
 vectored_exception_handler PROC
@@ -61,6 +64,18 @@
     ret
 
 asm_c_exception_handler ENDP
+
+asm_process_native_breakpoint_event PROC
+
+    pushfq
+    cld
+    sub     rsp, 32 ; allocate stack for 4 registers
+    call    process_native_breakpoint_event
+    add     rsp, 32
+    popfq
+    ret
+
+asm_process_native_breakpoint_event ENDP
 
 
 _TEXT   ENDS



Mime
View raw message