automotive-dlt
|
#include <unistd.h>
#include <stdint.h>
#include <elf.h>
#include <sys/procfs.h>
#include <sys/user.h>
#include "dlt_cdh_streamer.h"
Go to the source code of this file.
Data Structures | |
struct | cdh_registers_t |
struct | proc_info_t |
Macros | |
#define | CORE_DIRECTORY "/var/core" |
#define | CORE_TMP_DIRECTORY "/var/core_tmp" |
#define | CORE_LOCK_DIRECTORY "/tmp/.core_locks" |
#define | CORE_MAX_FILENAME_LENGTH 255 |
#define | MAX_PROC_NAME_LENGTH 32 |
#define | CRASH_ID_LEN 8 |
#define | CRASHID_FILE "/tmp/.crashid" |
#define | CORE_FILE_PATTERN "%s/core.%d.%s.%d.gz" |
#define | CONTEXT_FILE_PATTERN "%s/context.%d.%s.%d.txt" |
#define | ELF_Ehdr Elf32_Ehdr |
#define | ELF_Phdr Elf32_Phdr |
#define | ELF_Shdr Elf32_Shdr |
#define | ELF_Nhdr Elf32_Nhdr |
Functions | |
cdh_status_t | get_exec_name (unsigned int p_pid_str, char *p_exec_name, int p_exec_name_maxsize) |
cdh_status_t | write_proc_context (const proc_info_t *) |
cdh_status_t | treat_coredump (proc_info_t *p_proc) |
cdh_status_t | treat_crash_data (proc_info_t *p_proc) |
cdh_status_t | move_to_core_directory (proc_info_t *p_proc) |
cdh_status_t | check_core_directory () |
Definition in file dlt_cdh.h.
#define CONTEXT_FILE_PATTERN "%s/context.%d.%s.%d.txt" |
Definition at line 48 of file dlt_cdh.h.
Referenced by core_locks(), move_to_core_directory(), and write_proc_context().
#define CORE_DIRECTORY "/var/core" |
Definition at line 39 of file dlt_cdh.h.
Referenced by check_core_directory(), and move_to_core_directory().
#define CORE_FILE_PATTERN "%s/core.%d.%s.%d.gz" |
Definition at line 47 of file dlt_cdh.h.
Referenced by core_locks(), init_coredump(), and move_to_core_directory().
#define CORE_LOCK_DIRECTORY "/tmp/.core_locks" |
Definition at line 41 of file dlt_cdh.h.
Referenced by check_core_directory(), clean_core_tmp_dir(), and core_locks().
#define CORE_MAX_FILENAME_LENGTH 255 |
Definition at line 42 of file dlt_cdh.h.
Referenced by clean_core_tmp_dir(), core_locks(), get_exec_name(), init_coredump(), list_dircontent_to(), move_to_core_directory(), and write_proc_context().
#define CORE_TMP_DIRECTORY "/var/core_tmp" |
Definition at line 40 of file dlt_cdh.h.
Referenced by check_core_directory(), clean_core_tmp_dir(), init_coredump(), move_to_core_directory(), and write_proc_context().
#define CRASHID_FILE "/tmp/.crashid" |
Definition at line 45 of file dlt_cdh.h.
Referenced by write_crashid_to_filesystem().
#define ELF_Nhdr Elf32_Nhdr |
Definition at line 53 of file dlt_cdh.h.
Referenced by get_crashed_registers().
#define ELF_Phdr Elf32_Phdr |
Definition at line 51 of file dlt_cdh.h.
Referenced by read_elf_headers().
#define MAX_PROC_NAME_LENGTH 32 |
Definition at line 43 of file dlt_cdh.h.
Referenced by get_crashed_registers().
cdh_status_t check_core_directory | ( | ) |
Definition at line 294 of file dlt_cdh.c.
References CDH_NOK, CDH_OK, check_and_create_directory(), clean_core_tmp_dir(), CORE_DIRECTORY, CORE_LOCK_DIRECTORY, and CORE_TMP_DIRECTORY.
Referenced by main().
cdh_status_t get_exec_name | ( | unsigned int | p_pid_str, |
char * | p_exec_name, | ||
int | p_exec_name_maxsize | ||
) |
Definition at line 52 of file dlt_cdh_context.c.
References CDH_NOK, CDH_OK, CORE_MAX_FILENAME_LENGTH, g_buffer, and NULL.
Referenced by main().
cdh_status_t move_to_core_directory | ( | proc_info_t * | p_proc | ) |
Definition at line 320 of file dlt_cdh.c.
References proc_info_t::can_create_coredump, CDH_NOK, CDH_OK, CONTEXT_FILE_PATTERN, CORE_DIRECTORY, CORE_FILE_PATTERN, CORE_MAX_FILENAME_LENGTH, CORE_TMP_DIRECTORY, proc_info_t::name, NULL, proc_info_t::pid, and proc_info_t::timestamp.
Referenced by main().
cdh_status_t treat_coredump | ( | proc_info_t * | p_proc | ) |
Definition at line 159 of file dlt_cdh_coredump.c.
References CDH_NOK, CDH_OK, close_coredump(), init_coredump(), read_elf_headers(), read_notes(), stream_finish(), and proc_info_t::streamer.
Referenced by main().
cdh_status_t treat_crash_data | ( | proc_info_t * | p_proc | ) |
Definition at line 191 of file dlt_cdh_crashid.c.
References CDH_NOK, CDH_OK, create_crashid(), get_crashed_registers(), and write_crashid_to_filesystem().
Referenced by main().
cdh_status_t write_proc_context | ( | const proc_info_t * | ) |
Definition at line 342 of file dlt_cdh_context.c.
References CDH_NOK, CDH_OK, CONTEXT_FILE_PATTERN, CORE_MAX_FILENAME_LENGTH, CORE_TMP_DIRECTORY, dump_file_to(), list_dircontent_to(), proc_info_t::name, NULL, proc_info_t::pid, PROC_FILENAME, proc_info_t::signal, proc_info_t::threadname, and proc_info_t::timestamp.
Referenced by main().