#if !defined(NDEBUG)
if (opt_TraceTraps)
- log_println("[signal_handle: trap %d]", type);
+ log_println("[trap_handle: type=%d, val=%p, pv=%p, sp=%p, ra=%p, xpc=%p]", type, val, pv, sp, ra, xpc);
#endif
#if defined(ENABLE_VMLOG)
es.code = NULL;
md_executionstate_read(&es, context);
+
+//# define TRAPS_VERBOSE
+# if !defined(NDEBUG) && defined(TRAPS_VERBOSE)
+ /* Dump contents of execution state */
+
+ if (opt_TraceTraps) {
+ log_println("[trap_handle: dumping execution state BEFORE ...]");
+ executionstate_println(&es);
+ }
+# endif
#endif
/* Do some preparations before we enter the nativeworld. */
/* Write back execution state to current context. */
md_executionstate_write(&es, context);
+
+# if !defined(NDEBUG) && defined(TRAPS_VERBOSE)
+ /* Dump contents of execution state */
+
+ if (opt_TraceTraps) {
+ log_println("[trap_handle: dumping execution state AFTER ...]");
+ executionstate_println(&es);
+ }
+# endif
#endif
/* Unwrap and return the exception object. */