Chinaunix首页 | 论坛 | 博客
  • 博客访问: 647487
  • 博文数量: 156
  • 博客积分: 4833
  • 博客等级: 上校
  • 技术积分: 1554
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-21 19:36
文章分类

全部博文(156)

文章存档

2016年(2)

2013年(1)

2012年(13)

2011年(30)

2010年(46)

2009年(29)

2008年(23)

2007年(12)

分类: BSD

2012-04-18 18:25:27


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)
阅读(1735) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~