[MLton-commit] r5741
jlouis at mlton.org
jlouis at mlton.org
Sun Jul 8 13:21:11 PDT 2007
Make the catcher code find the correct register on amd64/x86_64 in the FreeBSD platform C code.
----------------------------------------------------------------------
U mlton/trunk/runtime/platform/freebsd.c
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/platform/freebsd.c
===================================================================
--- mlton/trunk/runtime/platform/freebsd.c 2007-07-08 20:21:08 UTC (rev 5740)
+++ mlton/trunk/runtime/platform/freebsd.c 2007-07-08 20:21:10 UTC (rev 5741)
@@ -16,9 +16,15 @@
}
static void catcher (__attribute__ ((unused)) int sig,
- __attribute__ ((unused)) siginfo_t *sip,
+ __attribute__ ((unused)) siginfo_t *sip,
ucontext_t *ucp) {
+#if (defined (__x86_64__))
+ GC_handleSigProf ((code_pointer) ucp->uc_mcontext.mc_rip);
+#elif (defined (__i386__))
GC_handleSigProf ((code_pointer) ucp->uc_mcontext.mc_eip);
+#else
+#error Profiling handler is missing for this architecture
+#endif
}
void GC_setSigProfHandler (struct sigaction *sa) {
More information about the MLton-commit
mailing list