Path: blob/master/arch/arm/include/asm/a.out-core.h
17382 views
/* a.out coredump register dumper1*2* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public Licence7* as published by the Free Software Foundation; either version8* 2 of the Licence, or (at your option) any later version.9*/1011#ifndef _ASM_A_OUT_CORE_H12#define _ASM_A_OUT_CORE_H1314#ifdef __KERNEL__1516#include <linux/user.h>17#include <linux/elfcore.h>1819/*20* fill in the user structure for an a.out core dump21*/22static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)23{24struct task_struct *tsk = current;2526dump->magic = CMAGIC;27dump->start_code = tsk->mm->start_code;28dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1);2930dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT;31dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT;32dump->u_ssize = 0;3334memset(dump->u_debugreg, 0, sizeof(dump->u_debugreg));3536if (dump->start_stack < 0x04000000)37dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT;3839dump->regs = *regs;40dump->u_fpvalid = dump_fpu (regs, &dump->u_fp);41}4243#endif /* __KERNEL__ */44#endif /* _ASM_A_OUT_CORE_H */454647