diff options
Diffstat (limited to 'arch/um/kernel/skas/process.c')
-rw-r--r-- | arch/um/kernel/skas/process.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index 5cd0e9929789..599d679bd4fc 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c | |||
@@ -69,6 +69,17 @@ void wait_stub_done(int pid, int sig, char * fname) | |||
69 | 69 | ||
70 | if((n < 0) || !WIFSTOPPED(status) || | 70 | if((n < 0) || !WIFSTOPPED(status) || |
71 | (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){ | 71 | (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){ |
72 | unsigned long regs[FRAME_SIZE]; | ||
73 | if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) | ||
74 | printk("Failed to get registers from stub, " | ||
75 | "errno = %d\n", errno); | ||
76 | else { | ||
77 | int i; | ||
78 | |||
79 | printk("Stub registers -\n"); | ||
80 | for(i = 0; i < FRAME_SIZE; i++) | ||
81 | printk("\t%d - %lx\n", i, regs[i]); | ||
82 | } | ||
72 | panic("%s : failed to wait for SIGUSR1/SIGTRAP, " | 83 | panic("%s : failed to wait for SIGUSR1/SIGTRAP, " |
73 | "pid = %d, n = %d, errno = %d, status = 0x%x\n", | 84 | "pid = %d, n = %d, errno = %d, status = 0x%x\n", |
74 | fname, pid, n, errno, status); | 85 | fname, pid, n, errno, status); |
@@ -370,9 +381,9 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
370 | } | 381 | } |
371 | 382 | ||
372 | /* | 383 | /* |
373 | * This is used only, if proc_mm is available, while PTRACE_FAULTINFO | 384 | * This is used only, if stub pages are needed, while proc_mm is |
374 | * isn't. Opening /proc/mm creates a new mm_context, which lacks the stub-pages | 385 | * availabl. Opening /proc/mm creates a new mm_context, which lacks |
375 | * Thus, we map them using /proc/mm-fd | 386 | * the stub-pages. Thus, we map them using /proc/mm-fd |
376 | */ | 387 | */ |
377 | void map_stub_pages(int fd, unsigned long code, | 388 | void map_stub_pages(int fd, unsigned long code, |
378 | unsigned long data, unsigned long stack) | 389 | unsigned long data, unsigned long stack) |