coredump: Support signal number

Change-Id: If220bcd0865569a566e08aa53cae748fdc6317d0
Refs: #1340
This commit is contained in:
Ken Sato
2019-07-26 12:50:58 +09:00
committed by Masamichi Takagi
parent 11ef2f8092
commit 0c1cae45fe
15 changed files with 622 additions and 11 deletions

View File

@@ -2,7 +2,8 @@
#include <process.h>
#include <elfcore.h>
void arch_fill_prstatus(struct elf_prstatus64 *prstatus, struct thread *thread, void *regs0)
void arch_fill_prstatus(struct elf_prstatus64 *prstatus,
struct thread *thread, void *regs0, int sig)
{
struct x86_user_context *uctx = regs0;
struct x86_basic_regs *regs = &uctx->gpr;
@@ -31,6 +32,9 @@ void arch_fill_prstatus(struct elf_prstatus64 *prstatus, struct thread *thread,
prstatus->pr_ppid = thread->proc->parent->pid;
}
prstatus->pr_info.si_signo = sig;
prstatus->pr_cursig = sig;
prstatus->pr_reg[0] = _r15;
prstatus->pr_reg[1] = _r14;
prstatus->pr_reg[2] = _r13;