37 #include <sys/resource.h> 56 syslog(LOG_ERR,
"Cannot allocate Phdr memory (%d headers)", p_proc->
m_Ehdr.e_phnum);
60 for (phnum = 0; phnum < p_proc->
m_Ehdr.e_phnum; phnum++)
74 for (i = 0; i < p_proc->
m_Ehdr.e_phnum; i++)
76 syslog(LOG_INFO,
"==Note section prog_note:%d type:0x%X offset:0x%X size:0x%X (%dbytes)",
83 if (p_proc->
m_pPhdr[i].p_type == PT_NOTE)
99 syslog(LOG_ERR,
"Cannot find note header page index");
106 syslog(LOG_ERR,
"Cannot move to note header");
110 if ((p_proc->
m_Nhdr = (
char*) malloc(p_proc->
m_pPhdr[prog_note].p_filesz)) ==
NULL)
112 syslog(LOG_ERR,
"Cannot allocate Nhdr memory (note size %d bytes)", p_proc->
m_pPhdr[prog_note].p_filesz);
118 syslog(LOG_ERR,
"Cannot read note header");
166 syslog(LOG_ERR,
"cannot init coredump system");
176 syslog(LOG_ERR,
"cannot read NOTES");
185 syslog(LOG_ERR,
"cannot read ELF header");
194 syslog(LOG_ERR,
"cannot finish coredump compression");
198 syslog(LOG_ERR,
"cannot close coredump system");
unsigned int m_note_page_size
cdh_status_t treat_coredump(proc_info_t *p_proc)
char name[MAX_PROC_NAME_LENGTH]
int stream_finish(file_streamer_t *p_fs)
int stream_move_to_offest(file_streamer_t *p_fs, unsigned int p_offset)
cdh_status_t stream_read(file_streamer_t *p_fs, void *p_buf, unsigned int p_size)
#define CORE_TMP_DIRECTORY
cdh_status_t stream_close(file_streamer_t *p_fs)
cdh_status_t stream_init(file_streamer_t *p_fs, const char *p_src_fname, const char *p_dst_fname)
cdh_status_t close_coredump(proc_info_t *p_proc)
cdh_status_t init_coredump(proc_info_t *p_proc)
int getNotePageIndex(proc_info_t *p_proc)
#define CORE_FILE_PATTERN
cdh_status_t read_notes(proc_info_t *p_proc)
#define CORE_MAX_FILENAME_LENGTH
cdh_status_t read_elf_headers(proc_info_t *p_proc)