#include "breakpoint.h"
#include "monitor.h"
-#ifdef linux
+#ifdef LISP_FEATURE_LINUX
extern int early_kernel;
#endif
void arch_skip_instruction(os_context_t *context)
{
((char *) *os_context_pc_addr(context)) = ((char *) *os_context_npc_addr(context));
- context->si_regs.npc += 4;
+ ((char *) *os_context_npc_addr(context)) += 4;
}
unsigned char *arch_internal_error_arguments(os_context_t *context)
{
unsigned long *pc = (unsigned long *)(*os_context_pc_addr(context));
/* FIXME */
- unsigned long *npc = &context->si_regs.npc;
+ unsigned long *npc = (unsigned long *)(*os_context_npc_addr(context));
/* orig_sigmask = context->sigmask;
sigemptyset(&context->sigmask); */
*npc = trap_AfterBreakpoint;
os_flush_icache((os_vm_address_t) npc, sizeof(unsigned long));
- /* How much is this not going to work? */
- sigreturn(context);
}
static int pseudo_atomic_trap_p(os_context_t *context)
{
os_context_t *context = arch_os_get_context(&void_context);
- sigprocmask(SIG_SETMASK, &context->si_mask, 0);
+ sigprocmask(SIG_SETMASK, os_context_sigmask_addr(context), 0);
if ((siginfo->si_code) == ILL_ILLOPC
-#ifdef linux
+#ifdef LISP_FEATURE_LINUX
|| (early_kernel && (siginfo->si_code == 2))
#endif
) {
case trap_FunEndBreakpoint:
*os_context_pc_addr(context) = (int) handle_fun_end_breakpoint(signal, siginfo, context);
- context->si_regs.npc = *os_context_pc_addr(context) + 4;
+ *os_context_npc_addr(context) = *os_context_pc_addr(context) + 4;
break;
case trap_AfterBreakpoint:
}
}
else if ((siginfo->si_code) == ILL_ILLTRP
-#ifdef linux
+#ifdef LISP_FEATURE_LINUX
|| (early_kernel && (siginfo->si_code) == 192)
#endif
) {
return call_into_lisp(function, args, 3);
}
+