Loading arch/cris/Kconfig.debug +6 −0 Original line number Original line Diff line number Diff line Loading @@ -32,4 +32,10 @@ config DEBUG_NMI_OOPS If the system locks up without any debug information you can say Y If the system locks up without any debug information you can say Y here to make it possible to dump an OOPS with an external NMI. here to make it possible to dump an OOPS with an external NMI. config NO_SEGFAULT_TERMINATION bool "Keep segfaulting processes" help Place segfaulting user mode processes on a wait queue instead of delivering a terminating SIGSEGV to allow debugging with gdb. endmenu endmenu arch/cris/mm/fault.c +10 −3 Original line number Original line Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include <linux/mm.h> #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/module.h> #include <linux/wait.h> #include <asm/uaccess.h> #include <asm/uaccess.h> extern int find_fixup_code(struct pt_regs *); extern int find_fixup_code(struct pt_regs *); Loading Loading @@ -190,14 +191,20 @@ do_page_fault(unsigned long address, struct pt_regs *regs, /* User mode accesses just cause a SIGSEGV */ /* User mode accesses just cause a SIGSEGV */ if (user_mode(regs)) { if (user_mode(regs)) { printk(KERN_NOTICE "%s (pid %d) segfaults for page " "address %08lx at pc %08lx\n", tsk->comm, tsk->pid, address, instruction_pointer(regs)); #ifdef CONFIG_NO_SEGFAULT_TERMINATION DECLARE_WAIT_QUEUE_HEAD(wq); wait_event_interruptible(wq, 0 == 1); #else info.si_signo = SIGSEGV; info.si_signo = SIGSEGV; info.si_errno = 0; info.si_errno = 0; /* info.si_code has been set above */ /* info.si_code has been set above */ info.si_addr = (void *)address; info.si_addr = (void *)address; force_sig_info(SIGSEGV, &info, tsk); force_sig_info(SIGSEGV, &info, tsk); printk(KERN_NOTICE "%s (pid %d) segfaults for page " #endif "address %08lx at pc %08lx\n", tsk->comm, tsk->pid, address, instruction_pointer(regs)); return; return; } } Loading Loading
arch/cris/Kconfig.debug +6 −0 Original line number Original line Diff line number Diff line Loading @@ -32,4 +32,10 @@ config DEBUG_NMI_OOPS If the system locks up without any debug information you can say Y If the system locks up without any debug information you can say Y here to make it possible to dump an OOPS with an external NMI. here to make it possible to dump an OOPS with an external NMI. config NO_SEGFAULT_TERMINATION bool "Keep segfaulting processes" help Place segfaulting user mode processes on a wait queue instead of delivering a terminating SIGSEGV to allow debugging with gdb. endmenu endmenu
arch/cris/mm/fault.c +10 −3 Original line number Original line Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include <linux/mm.h> #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/module.h> #include <linux/wait.h> #include <asm/uaccess.h> #include <asm/uaccess.h> extern int find_fixup_code(struct pt_regs *); extern int find_fixup_code(struct pt_regs *); Loading Loading @@ -190,14 +191,20 @@ do_page_fault(unsigned long address, struct pt_regs *regs, /* User mode accesses just cause a SIGSEGV */ /* User mode accesses just cause a SIGSEGV */ if (user_mode(regs)) { if (user_mode(regs)) { printk(KERN_NOTICE "%s (pid %d) segfaults for page " "address %08lx at pc %08lx\n", tsk->comm, tsk->pid, address, instruction_pointer(regs)); #ifdef CONFIG_NO_SEGFAULT_TERMINATION DECLARE_WAIT_QUEUE_HEAD(wq); wait_event_interruptible(wq, 0 == 1); #else info.si_signo = SIGSEGV; info.si_signo = SIGSEGV; info.si_errno = 0; info.si_errno = 0; /* info.si_code has been set above */ /* info.si_code has been set above */ info.si_addr = (void *)address; info.si_addr = (void *)address; force_sig_info(SIGSEGV, &info, tsk); force_sig_info(SIGSEGV, &info, tsk); printk(KERN_NOTICE "%s (pid %d) segfaults for page " #endif "address %08lx at pc %08lx\n", tsk->comm, tsk->pid, address, instruction_pointer(regs)); return; return; } } Loading