void arch_init(void)
{}
+
+os_vm_address_t
+arch_get_bad_addr(int sig, siginfo_t *code, os_context_t *context)
+{
+ return (os_vm_address_t)code->si_addr;
+}
+
\f
/*
* hacking signal contexts
int *
context_eflags_addr(os_context_t *context)
{
-#if defined __linux__
+#if defined __linux__ || defined __sun
/* KLUDGE: As of kernel 2.2.14 on Red Hat 6.2, there's code in the
* <sys/ucontext.h> file to define symbolic names for offsets into
* gregs[], but it's conditional on __USE_GNU and not defined, so
SetSymbolValue(PSEUDO_ATOMIC_INTERRUPTED, make_fixnum(1),
arch_os_get_current_thread());
}
+
+void
+arch_clear_pseudo_atomic_interrupted(os_context_t *context)
+{
+ SetSymbolValue(PSEUDO_ATOMIC_INTERRUPTED, make_fixnum(0),
+ arch_os_get_current_thread());
+}
\f
/*
* This stuff seems to get called for TRACE and debug activity.
*/
-unsigned long
+unsigned int
arch_install_breakpoint(void *pc)
{
- unsigned long result = *(unsigned long*)pc;
+ unsigned int result = *(unsigned int*)pc;
*(char*)pc = BREAKPOINT_INST; /* x86 INT3 */
*((char*)pc+1) = trap_Breakpoint; /* Lisp trap code */
}
void
-arch_remove_breakpoint(void *pc, unsigned long orig_inst)
+arch_remove_breakpoint(void *pc, unsigned int orig_inst)
{
*((char *)pc) = orig_inst & 0xff;
*((char *)pc + 1) = (orig_inst & 0xff00) >> 8;
*context_eflags_addr(context) |= 0x100;
#endif
- single_stepping = (unsigned int*)pc;
+ single_stepping = pc;
#ifdef CANNOT_GET_TO_SINGLE_STEP_FLAG
*os_context_pc_addr(context) = (char *)pc - 9;