APP coredump:
#define __elfN(x) __CONCAT(__CONCAT(__CONCAT(elf,__ELF_WORD_SIZE),_),x)
__elfN(coredump) = __elf64_coredump
static Elf64_Brandinfo freebsd_brand_info = {
.brand = ELFOSABI_FREEBSD,
.machine = EM_MIPS,
.compat_3_brand = "FreeBSD",
.emul_path = NULL,
.interp_path = "/libexec/ld-elf.so.1",
.sysvec = &elf64_freebsd_sysvec,
.interp_newpath = NULL,
.flags = 0
};
struct sysentvec elf64_freebsd_sysvec = {
......
.sv_coredump = __elfN(coredump)
......
}
static int
coredump(struct thread *td)=>(p->p_sysent->sv_coredump)
int __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags)
=>core_output=>compress_core=>
compress_core()
{
EVENTHANDLER_INVOKE(app_coredump_progress, td, len_compressed);
}
Kernel coredump:
“void panic(const char *fmt, ...)” function, when go into db>, use “panic” command to trigger kernel coredump.
The coredump main function : doadump->dumpsys->cb_dumpdata->(di->dumper)
阅读(1859) | 评论(0) | 转发(0) |