blob: 28ffa94aed6b85d10531e7dc11864f9ebc8701f4 [file] [log] [blame]
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -08001#ifndef _LINUX_COREDUMP_H
2#define _LINUX_COREDUMP_H
3
4#include <linux/types.h>
5#include <linux/mm.h>
6#include <linux/fs.h>
Richard Weinberger1d46e232012-10-19 13:56:47 -07007#include <asm/siginfo.h>
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -08008
9/*
10 * These are the only things you should do on a core-file: use only these
11 * functions to write out all the necessary info.
12 */
Al Viroecc8c772013-10-05 15:32:35 -040013struct coredump_params;
Al Viro9b56d542013-10-08 09:26:08 -040014extern int dump_skip(struct coredump_params *cprm, size_t nr);
Al Viroecc8c772013-10-05 15:32:35 -040015extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);
Al Viro22a8cb82013-10-08 11:05:01 -040016extern int dump_align(struct coredump_params *cprm, int align);
Dave Kleikamp4d22c752017-01-11 13:25:00 -060017extern void dump_truncate(struct coredump_params *cprm);
Alex Kelly179899f2012-10-04 17:15:24 -070018#ifdef CONFIG_COREDUMP
Al Viroec579412013-10-13 17:57:29 -040019extern void do_coredump(const siginfo_t *siginfo);
Alex Kelly179899f2012-10-04 17:15:24 -070020#else
Al Viroec579412013-10-13 17:57:29 -040021static inline void do_coredump(const siginfo_t *siginfo) {}
Alex Kelly179899f2012-10-04 17:15:24 -070022#endif
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -080023
24#endif /* _LINUX_COREDUMP_H */