1 /* a.out coredump register dumper
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
12 #ifndef _ASM_A_OUT_CORE_H
13 #define _ASM_A_OUT_CORE_H
17 #include <linux/user.h>
18 #include <linux/elfcore.h>
21 * fill in the user structure for an a.out core dump
23 static inline void aout_dump_thread(struct pt_regs
*regs
, struct user
*dump
)
25 struct task_struct
*tsk
= current
;
28 dump
->start_code
= tsk
->mm
->start_code
;
29 dump
->start_stack
= regs
->ARM_sp
& ~(PAGE_SIZE
- 1);
31 dump
->u_tsize
= (tsk
->mm
->end_code
- tsk
->mm
->start_code
) >> PAGE_SHIFT
;
32 dump
->u_dsize
= (tsk
->mm
->brk
- tsk
->mm
->start_data
+ PAGE_SIZE
- 1) >> PAGE_SHIFT
;
35 memset(dump
->u_debugreg
, 0, sizeof(dump
->u_debugreg
));
37 if (dump
->start_stack
< 0x04000000)
38 dump
->u_ssize
= (0x04000000 - dump
->start_stack
) >> PAGE_SHIFT
;
41 dump
->u_fpvalid
= dump_fpu (regs
, &dump
->u_fp
);
44 #endif /* __KERNEL__ */
45 #endif /* _ASM_A_OUT_CORE_H */